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