| 1 | #!/usr/bin/make -f |
|---|
| 2 | # Made with the aid of debmake, by Christoph Lameter, |
|---|
| 3 | # based on the sample debian/rules file for GNU hello by Ian Jackson. |
|---|
| 4 | |
|---|
| 5 | package=gajim |
|---|
| 6 | |
|---|
| 7 | build: build-stamp |
|---|
| 8 | build-stamp: |
|---|
| 9 | $(checkdir) |
|---|
| 10 | |
|---|
| 11 | # $(MAKE) CFLAGS="-O2 -g -Wall" |
|---|
| 12 | make |
|---|
| 13 | touch build |
|---|
| 14 | |
|---|
| 15 | clean: |
|---|
| 16 | $(checkdir) |
|---|
| 17 | rm -f build |
|---|
| 18 | # -$(MAKE) clean |
|---|
| 19 | make clean |
|---|
| 20 | rm -f `find . -name "*~"` |
|---|
| 21 | rm -rf debian/tmp debian/files* core debian/substvars |
|---|
| 22 | |
|---|
| 23 | install: install-stamp |
|---|
| 24 | install-stamp: build-stamp |
|---|
| 25 | $(checkdir) |
|---|
| 26 | rm -rf debian/tmp |
|---|
| 27 | install -d debian/tmp |
|---|
| 28 | cd debian/tmp && install -d `cat ../dirs` |
|---|
| 29 | make install PREFIX=/usr DESTDIR=`pwd`/debian/tmp |
|---|
| 30 | cp gajim.xpm debian/tmp/usr/share/pixmaps |
|---|
| 31 | chmod -x debian/tmp/usr/share/gajim/runCore.py |
|---|
| 32 | sed -ne '1d;w debian/tmp/runCore.py.tmp' debian/tmp/usr/share/gajim/runCore.py |
|---|
| 33 | mv debian/tmp/runCore.py.tmp debian/tmp/usr/share/gajim/runCore.py |
|---|
| 34 | |
|---|
| 35 | binary-indep: checkroot build |
|---|
| 36 | $(checkdir) |
|---|
| 37 | # There are no architecture-independent files to be uploaded |
|---|
| 38 | # generated by this package. If there were any they would be |
|---|
| 39 | # made here. |
|---|
| 40 | |
|---|
| 41 | binary-arch: checkroot build install |
|---|
| 42 | $(checkdir) |
|---|
| 43 | # Must have debmake installed for this to work. Otherwise please copy |
|---|
| 44 | # /usr/bin/debstd into the debian directory and change debstd to debian/debstd |
|---|
| 45 | debstd -m |
|---|
| 46 | gzip --best -c gajim.1 > debian/tmp/usr/share/man/man1/gajim.1.gz |
|---|
| 47 | cd debian/tmp; md5sum usr/share/man/man1/gajim.1.gz >> DEBIAN/md5sums |
|---|
| 48 | dpkg-gencontrol -isp |
|---|
| 49 | chown -R root:root debian/tmp |
|---|
| 50 | chmod -R go=rX debian/tmp |
|---|
| 51 | dpkg --build debian/tmp .. |
|---|
| 52 | |
|---|
| 53 | define checkdir |
|---|
| 54 | test -f debian/rules |
|---|
| 55 | endef |
|---|
| 56 | |
|---|
| 57 | binary: binary-indep binary-arch |
|---|
| 58 | |
|---|
| 59 | checkroot: |
|---|
| 60 | $(checkdir) |
|---|
| 61 | test root = "`whoami`" |
|---|
| 62 | |
|---|
| 63 | .PHONY: binary binary-arch binary-indep clean checkroot |
|---|