[22693] | 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 | \ |
---|
[23505] | 35 | grep -v chrony | grep -v ntp | \ |
---|
[23560] | 36 | grep -v sysklogd | \ |
---|
[22693] | 37 | tr '\n' ',' >> $@; |
---|
| 38 | echo >> $@ |
---|
| 39 | |
---|
| 40 | # evil exception: bash build-depends on tetex-bin |
---|
| 41 | |
---|
| 42 | binary-predeb/debathena-build-depends:: add-deps/debathena-build-depends |
---|
| 43 | |
---|
| 44 | add-deps/debathena-build-depends: debian/deps |
---|
| 45 | cat $< >> debian/$(cdbs_curpkg).substvars |
---|
| 46 | |
---|
| 47 | # $(APT_CACHE) $(APT_STATE) $(APTITUDE_STATE) |
---|
| 48 | check-debathena-repository-added: |
---|
| 49 | for i in $(DEBATHENA_REPOSITORY_SECTIONS); do \ |
---|
| 50 | $(APTITUDE) search ~s^$$i/ | grep -q ^ || exit 1; \ |
---|
| 51 | done |
---|
| 52 | |
---|
| 53 | clean:: |
---|
| 54 | rm -f $(APTITUDE_LOCKFILE) debian/deps |
---|
| 55 | rm -rf $(APT_CACHE) $(APT_STATE) $(APTITUDE_STATE) |
---|