1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
#!/usr/bin/make -f
#
# Based in the sample debian/rules file for GNU Hello.
# Copyright 1994,1995 by Ian Jackson
package = pal
docdir = debian/tmp/usr/share/doc/$(package)
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
configure: configure-stamp
configure-stamp:
$(checkdir)
touch configure-stamp
build: configure-stamp build-stamp
build-stamp:
$(checkdir)
cd src/ && $(MAKE)
touch build-stamp
# # ical2pal
# cd src/convert/ && $(MAKE) ical
clean:
$(checkdir)
rm -f build-stamp configure-stamp
cd src/ && $(MAKE) cleandeps
cd src/convert/ && $(MAKE) cleandeps
rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
install: checkroot build
$(checkdir)
rm -rf debian/tmp
install -d debian/tmp/DEBIAN $(docdir)
cd src/ && $(MAKE) install-mo DESTDIR=$(CURDIR)/debian/tmp
cd src/ && $(MAKE) install-man DESTDIR=$(CURDIR)/debian/tmp
cd src/ && $(MAKE) install-bin DESTDIR=$(CURDIR)/debian/tmp
cd src/ && $(MAKE) install-share DESTDIR=$(CURDIR)/debian/tmp
# # ical2pal
# cd src/convert/ && $(MAKE) ical-install DESTDIR=$(CURDIR)/debian/tmp
binary-indep: build install
binary-arch: checkroot build install
$(checkdir)
strip debian/tmp/usr/bin/pal
strip -R .comment debian/tmp/usr/bin/pal
install -m 755 \
debian/preinst debian/postinst \
debian/prerm debian/postrm \
debian/tmp/DEBIAN
install -m 644 debian/conffiles debian/tmp/DEBIAN
cp -a doc/example.css $(docdir)
cp -a debian/README.Debian debian/copyright $(docdir)
cp -a ChangeLog $(docdir)/changelog
cp -a debian/changelog $(docdir)/changelog.Debian
install -d debian/tmp/etc
# # ical2pal
# strip debian/tmp/usr/bin/ical2pal
# strip -R .comment debian/tmp/usr/bin/ical2pal
# # no longer needed
# cp -a debian/tmp/usr/share/pal/pal.conf debian/tmp/etc/pal.conf
# rm -f debian/tmp/usr/share/pal/pal.conf
cd $(docdir) && gzip -9 changelog changelog.Debian
gzip -r9 debian/tmp/usr/share/man
chmod -x debian/tmp/usr/share/man/man1/pal.1.gz
dpkg-shlibdeps debian/tmp/usr/bin/pal
dpkg-gencontrol -isp
chown -R root:root debian/tmp
chmod -R u+w,go=rX debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f src/main.c -a -f debian/rules
endef
checkroot:
$(checkdir)
test $$(id -u) = 0
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|