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 89 90 91 92 93 94 95 96 97 98 99
|
#!/usr/bin/make -f
INSTALL = install
INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
package=zshdb
configure: configure-stamp
configure-stamp:
$(checkdir)
# mkdir obj
# cd obj && ../configure --prefix=/usr --with-zsh=/bin/zsh-beta
chmod 755 ./configure
./configure --prefix=/usr --with-zsh=/bin/zsh --disable-maintainer-mode --with-lispdir=/usr/share/emacs/site-lisp/zshdb
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
$(checkdir)
# Add here commands to compile the package.
# cd obj && $(MAKE)
# cd obj && $(MAKE) check
$(MAKE)
touch $@
check: build
if tty >/dev/null 2>&1; then LC_ALL=C $(MAKE) check; else echo "*** NOT RUNNING TESTSUITE WITHOUT A TTY ***" >&2; fi
maybe_check = $(if $(findstring nocheck,$(DEB_BUILD_OPTIONS)),,check)
clean: checkroot
test ! -f Makefile || $(MAKE) distclean
rm -rf obj autom4te.cache
rm -f build-stamp configure-stamp config.status config.log
rm -f debian/zshdb.substvars *~ *-stamp
rm -rf debian/zshdb/
rm -f debian/files
rm -f doc/zshdb.1 test/lopts.check
install: build checkroot
rm -rf debian/zshdb
$(INSTALL_DIR) debian/zshdb/usr/bin
# cd obj && $(MAKE) DESTDIR=$(CURDIR)/debian/zshdb install
$(MAKE) DESTDIR=$(CURDIR)/debian/zshdb install
binary-indep: build $(maybe_check) install checkroot
rm -f debian/zshdb/usr/share/emacs/site-lisp/zshdb/zshdb.elc
$(INSTALL_DIR) debian/zshdb/usr/share/doc/zshdb
$(INSTALL_FILE) debian/changelog debian/zshdb/usr/share/doc/zshdb/changelog.Debian
$(INSTALL_FILE) ChangeLog debian/zshdb/usr/share/doc/zshdb/changelog
$(INSTALL_FILE) README debian/copyright debian/zshdb/usr/share/doc/zshdb/
gzip -9fv debian/zshdb/usr/share/doc/zshdb/changelog.Debian \
debian/zshdb/usr/share/doc/zshdb/changelog \
debian/zshdb/usr/share/doc/zshdb/README \
debian/zshdb/usr/share/man/man1/zshdb.1
$(INSTALL_DIR) debian/zshdb/usr/lib/emacsen-common/packages/install \
debian/zshdb/usr/lib/emacsen-common/packages/remove \
debian/zshdb/etc/emacs/site-start.d
$(INSTALL_SCRIPT) debian/emacsen-install debian/zshdb/usr/lib/emacsen-common/packages/install/zshdb
$(INSTALL_SCRIPT) debian/emacsen-remove debian/zshdb/usr/lib/emacsen-common/packages/remove/zshdb
$(INSTALL_FILE) debian/emacsen-startup debian/zshdb/etc/emacs/site-start.d/50zshdb.el
$(INSTALL_DIR) debian/zshdb/DEBIAN
dpkg-gencontrol -ldebian/changelog -Tdebian/zshdb.substvars -Pdebian/zshdb
$(INSTALL_SCRIPT) debian/zshdb.postinst debian/zshdb/DEBIAN/postinst
$(INSTALL_SCRIPT) debian/zshdb.prerm debian/zshdb/DEBIAN/prerm
$(INSTALL_FILE) debian/zshdb.conffiles debian/zshdb/DEBIAN/conffiles
cd debian/zshdb && find . -type f ! -path etc/emacs/site-start.d/50zshdb.el ! -regex '.*/DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
chown -R root:root debian/zshdb
chmod -R u=rwX,go=rX debian/zshdb
dpkg-deb --build debian/zshdb ..
binary: binary-indep
prebuild:
autoreconf -fiv
define checkdir
test -f debian/rules
endef
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: build check clean binary-indep binary-arch binary install configure prebuild
|