source: trunk/debathena/meta/build-depends/debian/rules @ 23560

Revision 23560, 1.7 KB checked in by broder, 13 years ago (diff)
In build-depends: * Filter sysklogd.
  • Property svn:executable set to *
Line 
1#!/usr/bin/make -f
2
3include /usr/share/cdbs/1/rules/debhelper.mk
4
5APT_CACHE = $(CURDIR)/debian/apt-cache
6APTITUDE_LOCKFILE = $(CURDIR)/debian/aptitude-lockfile
7APT_STATE = $(CURDIR)/debian/apt-state
8APTITUDE_STATE = $(CURDIR)/debian/aptitude-state
9#APTITUDE = aptitude -o 'Aptitude::LockFile=$(APTITUDE_LOCKFILE)' -o 'Dir::State=$(APT_STATE)' -o 'Dir::Cache=$(APT_CACHE)' -o 'Dir::Aptitude::state=$(APTITUDE_STATE)' -o "Debug::NoLocking=yes"
10APTITUDE = aptitude -o 'Aptitude::LockFile=$(APTITUDE_LOCKFILE)' -o 'Debug::NoLocking=yes'
11
12$(APT_CACHE):
13        mkdir -p $@ $@/archives $@/archives/partial
14
15$(APT_STATE):
16        mkdir -p $@ $@/lists $@/lists/partial
17
18$(APTITUDE_STATE):
19        mkdir -p $@
20
21DEBATHENA_REPOSITORY_SECTIONS = debathena
22
23common-build-indep:: debian/deps
24
25debian/deps: check-debathena-repository-added
26        echo -n "debathena-build-depends:Depends=" > $@
27        $(APTITUDE) search $(patsubst %,~s^%/,$(DEBATHENA_REPOSITORY_SECTIONS)) -F '%p' | \
28            xargs apt-cache showsrc | \
29            dpkg-awk 'Section:^debathena' -f - -- Build-Depends | \
30            sed -n 's/^Build-Depends: \(.*\)$$/\1/p' | \
31            sed 's/, /\n/g' | \
32            sort -u | \
33            grep -v '\[' | \
34            grep -v tetex | \
35            grep -v chrony | grep -v ntp | \
36            grep -v sysklogd | \
37            tr '\n' ',' >> $@;
38        echo >> $@
39
40# evil exception: bash build-depends on tetex-bin
41
42binary-predeb/debathena-build-depends:: add-deps/debathena-build-depends
43
44add-deps/debathena-build-depends: debian/deps
45        cat $< >> debian/$(cdbs_curpkg).substvars
46
47# $(APT_CACHE) $(APT_STATE) $(APTITUDE_STATE)
48check-debathena-repository-added:
49        for i in $(DEBATHENA_REPOSITORY_SECTIONS); do \
50            $(APTITUDE) search ~s^$$i/ | grep -q ^ || exit 1; \
51        done
52
53clean::
54        rm -f $(APTITUDE_LOCKFILE) debian/deps
55        rm -rf $(APT_CACHE) $(APT_STATE) $(APTITUDE_STATE)
Note: See TracBrowser for help on using the repository browser.