source: trunk/debathena/meta/syslog/debian/rules @ 25480

Revision 25480, 886 bytes checked in by jdreed, 13 years ago (diff)
In syslog: * Deal with multi-arch by checking if aptitude supports the ~r expression * Only accept the first line that's returned from aptitude
  • Property svn:executable set to *
Line 
1#!/usr/bin/make -f
2
3include /usr/share/cdbs/1/rules/debhelper.mk
4
5APTITUDE_LOCKFILE = $(CURDIR)/debian/aptitude-lockfile
6APTITUDE = aptitude -o 'Aptitude::LockFile=$(APTITUDE_LOCKFILE)' -o 'Debug::NoLocking=yes'
7MULTIARCH = $(shell $(APTITUDE) search '~Psystem-log-daemon~rnative' > /dev/null 2>&1 && echo "y")
8
9common-build-indep:: debian/deps
10
11debian/deps:
12        echo -n "debathena-syslog-depends=" > $@
13ifeq ($(MULTIARCH),y)
14        $(APTITUDE) search '~Psystem-log-daemon~pimportant~rnative' -F '%p' | head -1 >> $@
15else
16        $(APTITUDE) search '~Psystem-log-daemon~pimportant' -F '%p' | head -1 >> $@
17endif
18        echo >> $@
19
20# DEFAULT_SYSLOG = $(shell $(APTITUDE) search -F"%p" ~Psystem-log-daemon~pimportant)
21
22binary-predeb/debathena-syslog:: add-deps/debathena-syslog
23
24add-deps/debathena-syslog: debian/deps
25        cat $< >> debian/$(cdbs_curpkg).substvars
26
27clean::
28        rm -f $(APTITUDE_LOCKFILE) debian/deps
Note: See TracBrowser for help on using the repository browser.