1 | #!/usr/bin/make -f |
---|
2 | |
---|
3 | include /usr/share/cdbs/1/rules/debhelper.mk |
---|
4 | |
---|
5 | APT_CACHE = $(CURDIR)/debian/apt-cache |
---|
6 | APTITUDE_LOCKFILE = $(CURDIR)/debian/aptitude-lockfile |
---|
7 | APT_STATE = $(CURDIR)/debian/apt-state |
---|
8 | APTITUDE_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" |
---|
10 | APTITUDE = 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 | |
---|
21 | DEBATHENA_REPOSITORY_SECTIONS = debathena |
---|
22 | |
---|
23 | common-build-indep:: debian/deps |
---|
24 | |
---|
25 | debian/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 | tr '\n' ',' >> $@; |
---|
36 | echo >> $@ |
---|
37 | |
---|
38 | # evil exception: bash build-depends on tetex-bin |
---|
39 | |
---|
40 | binary-predeb/debathena-build-depends:: add-deps/debathena-build-depends |
---|
41 | |
---|
42 | add-deps/debathena-build-depends: debian/deps |
---|
43 | cat $< >> debian/$(cdbs_curpkg).substvars |
---|
44 | |
---|
45 | # $(APT_CACHE) $(APT_STATE) $(APTITUDE_STATE) |
---|
46 | check-debathena-repository-added: |
---|
47 | for i in $(DEBATHENA_REPOSITORY_SECTIONS); do \ |
---|
48 | $(APTITUDE) search ~s^$$i/ | grep -q ^ || exit 1; \ |
---|
49 | done |
---|
50 | |
---|
51 | clean:: |
---|
52 | rm -f $(APTITUDE_LOCKFILE) debian/deps |
---|
53 | rm -rf $(APT_CACHE) $(APT_STATE) $(APTITUDE_STATE) |
---|