source: trunk/debathena/config/afs-config/debian/rules @ 23754

Revision 23754, 1.1 KB checked in by broder, 16 years ago (diff)
In afs-config: * Add an "update" target to debian/rules to grab updates to the CellServDB and CellAlias files.
  • Property svn:executable set to *
Line 
1#!/usr/bin/make -f
2
3DEB_DIVERT_EXTENSION = .debathena
4DEB_DIVERT_FILES_debathena-afs-config += \
5        /etc/openafs/afs.conf.client.debathena \
6        /etc/openafs/CellAlias.debathena \
7        /etc/openafs/CellServDB.debathena \
8        /etc/openafs/SuidCells.debathena \
9        /etc/openafs/ThisCell.debathena \
10        /etc/openafs/cacheinfo.debathena
11DEB_TRANSFORM_FILES_debathena-afs-config += \
12        /etc/openafs/afs.conf.debathena
13include /usr/share/cdbs/1/rules/debhelper.mk
14include /usr/share/cdbs/1/rules/config-package.mk
15
16FROM_ATHENA = debian/CellAlias.debathena debian/CellServDB.debathena
17
18clean:: $(FROM_ATHENA)
19common-build-indep:: $(FROM_ATHENA)
20
21update::
22        UPDATE=1 debian/rules $(FROM_ATHENA)
23
24$(patsubst %.debathena,%.athena,$(FROM_ATHENA)) : %.athena: FORCE
25        wget http://stuff.mit.edu/afs/athena.mit.edu/service/$(patsubst debian/%.athena,%,$@) -O $@.new
26        if [ -z $$UPDATE ]; then \
27            diff -q $@ $@.new ;  # Check that they are the same. \
28            rm -f $@.new ; \
29        else \
30            mv $@.new $@ ; \
31        fi
32
33$(FROM_ATHENA) : %.debathena: %.athena %.debathena-extra
34        cat $^ >| $@.tmp
35        diff -q $@.tmp $@ || mv $@.tmp $@
36        rm -f $@.tmp
37
38FORCE:
39
40.PRECIOUS: $(patsubst %.debathena,%.athena,$(FROM_ATHENA))
Note: See TracBrowser for help on using the repository browser.