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

Revision 22693, 1.7 KB checked in by ghudson, 17 years ago (diff)
* debathena/meta: Snapshot config package sources from /mit/debathena/packages/meta.
  • Property svn:executable set to *
RevLine 
[22693]1#!/usr/bin/make -f
2
3DEB_AUTO_UPDATE_DEBIAN_CONTROL = 1
4include /usr/share/cdbs/1/rules/debhelper.mk
5
6APT_CACHE = $(CURDIR)/debian/apt-cache
7APTITUDE_LOCKFILE = $(CURDIR)/debian/aptitude-lockfile
8APT_STATE = $(CURDIR)/debian/apt-state
9APTITUDE_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"
11APTITUDE = 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
22DEBATHENA_REPOSITORY_SECTIONS = debathena
23
24common-build-indep:: debian/deps
25
26debian/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
41binary-predeb/debathena-build-depends:: add-deps/debathena-build-depends
42
43add-deps/debathena-build-depends: debian/deps
44        cat $< >> debian/$(cdbs_curpkg).substvars
45
46# $(APT_CACHE) $(APT_STATE) $(APTITUDE_STATE)
47check-debathena-repository-added:
48        for i in $(DEBATHENA_REPOSITORY_SECTIONS); do \
49            $(APTITUDE) search ~s^$$i/ | grep -q ^ || exit 1; \
50        done
51
52clean::
53        rm -f $(APTITUDE_LOCKFILE) debian/deps
54        rm -rf $(APT_CACHE) $(APT_STATE) $(APTITUDE_STATE)
Note: See TracBrowser for help on using the repository browser.