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 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
export DH_COMPAT=4
PACKAGE := bbdb
pwd=$(shell pwd)
TOPDIR := $(shell pwd)
t = ${TOPDIR}/debian/bbdb
_files_only = for f in ${1}; do if [ -f $$f ]; then echo $$f; fi; done
_install_scripts = set -e; \
for f in ${1}; \
do \
b=`basename $$f`; \
install -m ${2} $$f ${3}/$${b%.debian}; \
done;
perl_scripts := $(shell $(call _files_only, $(wildcard utils/*.pl)))
build: build-stamp
build-stamp:
dh_testdir
./configure
cd texinfo && $(MAKE) bbdb.info
cd texinfo && /usr/bin/texi2html -split=chapter bbdb.texinfo
for f in ${perl_scripts}; \
do \
sed -e 's@/usr/local/bin/perl.*@/usr/bin/perl@g' \
< $$f > $$f.debian; \
done;
touch build-stamp
clean:
dh_testdir
dh_testroot
-rm -f build-stamp
-rm -f ${perl_scripts:%=%.debian}
# -rm -f texinfo/bbdb.dvi
-rm -f texinfo/bbdb.info*
-rm -f texinfo/bbdb_*.html texinfo/bbdb.html
dh_clean
-rm -f Makefile
-rm -f lisp/Makefile
-rm -f misc/Makefile
-rm -f tex/Makefile
-rm -f texinfo/Makefile
-rm -f testing/Makefile
-rm -f utils/Makefile
-rm -f config.status
-rm -f config.log
-rm -f bits.tar.gz
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
cp -a Makefile debian/bbdb-pilot-jwz.el lisp \
${t}/usr/share/emacs/site-lisp/${PACKAGE}/
cp -a debian/bbdb-pilot-jwz.el ${t}/usr/share/emacs/site-lisp/${PACKAGE}/lisp/
mkdir -p ${t}/usr/share/emacs/site-lisp/${PACKAGE}/tex/
cp -a tex/*.tex ${t}/usr/share/emacs/site-lisp/${PACKAGE}/tex/
mkdir -p ${t}/usr/share/emacs/site-lisp/${PACKAGE}/utils/
cp utils/*.el ${t}/usr/share/emacs/site-lisp/${PACKAGE}/utils/
mkdir -p ${t}/usr/share/man/man1/
cp debian/bbdb-*.1 ${t}/usr/share/man/man1/
tar czf bits.tar.gz bits/
# Hey, we dont want to check for configure when emacs-install runs, so remove target for Makefile
# sed s/Makefile\ bbdb/bbdb/ <${t}/usr/share/emacs/site-lisp/bbdb/Makefile >Makefile.tmp
# mv -f Makefile.tmp ${t}/usr/share/emacs/site-lisp/bbdb/Makefile
sed s/Makefile\ rmail/rmail/ <${t}/usr/share/emacs/site-lisp/bbdb/lisp/Makefile >Makefile.tmp
mv -f Makefile.tmp ${t}/usr/share/emacs/site-lisp/bbdb/lisp/Makefile
patch ${t}/usr/share/emacs/site-lisp/bbdb/Makefile ${TOPDIR}/debian/Makepatch
# Install tex/* into usr/share/texmf/text/bbdb so one could use bbdb-print easy
mkdir -p ${t}/usr/share/texmf/tex/bbdb/
cp tex/*.tex ${t}/usr/share/texmf/tex/bbdb/
mkdir -p ${t}/usr/share/info
cp texinfo/*.info* ${t}/usr/share/info/
gzip -9 ${t}/usr/share/info/*
$(call _install_scripts, ${perl_scripts:%=%.debian}, 0755, ${t}/usr/bin)
# Install the generated html Documentation
-mkdir -p ${t}/usr/share/doc/bbdb/html/
-cp texinfo/bbdb.html texinfo/bbdb_*.html ${t}/usr/share/doc/bbdb/html/
# Build architecture-independent files here.
binary-indep: install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: install
dh_testdir
dh_testroot
dh_installemacsen
dh_installdocs
dh_installchangelogs ChangeLog
# dh_installinfo texinfo/*.info*
gzip -9 ${t}/usr/share/doc/bbdb/README.Debian
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean install binary-indep binary-arch binary
|