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
|
PACKAGE=`cat debian/PACKAGE`
PKGSNAME2=w3m-el
configure: configure-stamp
configure-stamp:
dh_testdir
[ -f configure ] || touch configure
[ -f configure.ORIG ] || mv configure configure.ORIG
autoconf
./configure --prefix=/usr --with-emacs=emacs
grep '^Package: ' debian/control | head -1 | sed -e "s/^Package: //g" > debian/PACKAGE
sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/README.Debian.in > debian/README.Debian
sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/dirs.in > debian/dirs
sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/emacsen-install.in > debian/emacsen-install
sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/emacsen-remove.in > debian/emacsen-remove
sed -e "s/@PACKAGE@/$(PACKAGE)/g" debian/emacsen-startup.in > debian/emacsen-startup
touch $@
build-indep: configure-stamp build-indep-stamp
build-indep-stamp:
dh_testdir
cd doc && $(MAKE) version.texi && makeinfo --no-split emacs-w3m-ja.texi && makeinfo --no-split emacs-w3m.texi
touch $@
build-arch:
build: build-indep build-arch
clean:
dh_testdir
dh_testroot
rm -f build*-stamp configure-stamp debian/PACKAGE debian/README.Debian debian/dirs debian/emacsen-install debian/emacsen-remove debian/emacsen-startup
if [ -f config.status ] && [ -f Makefile ]; then $(MAKE) distclean; fi
rm -f doc/version.texi
rm -rf autom4te*.cache
if [ -f configure.ORIG ]; then rm -f configure; mv configure.ORIG configure; fi
[ -s configure ] || rm -f configure
dh_clean
install: build-indep
dh_testdir
dh_testroot
dh_prep
dh_installdirs
for f in ChangeLog.* shimbun/ChangeLog*; do \
if [ -f "$$f" ]; then \
f2=`echo "$$f" | sed 's!/!.!g'`; \
install -m 644 "$$f" "$(CURDIR)/debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/$$f2"; \
fi; \
done
if [ -f "$$f" ]; then \
install -m 644 "$$f" $(CURDIR)/debian/$(PACKAGE)/usr/share/pixmaps/$(PKGSNAME2); \
fi; \
install -m 644 *.el $(CURDIR)/debian/$(PACKAGE)/usr/share/$(PKGSNAME2)
gitrev=`head -1 debian/changelog | perl -ne 'if (/\.\d{8}\.\d{1,4}\.([0-9a-f]+)/) {print "$$1\n"}'` && perl -0777 -pe 's/(\(defun w3mhack-insert-git-revision \(\)\n \(let \(\(revision)/$$1 "\\"'$$gitrev'\\""\) \(revision-orig/' w3mhack.el >$(CURDIR)/debian/$(PACKAGE)/usr/share/$(PKGSNAME2)/w3mhack.el
install -m 644 shimbun/*.el $(CURDIR)/debian/$(PACKAGE)/usr/share/$(PKGSNAME2)/shimbun
for f in icons30/*.gif icons30/*.png icons30/*.xpm; do \
if [ -f "$$f" ]; then \
install -m 644 "$$f" $(CURDIR)/debian/$(PACKAGE)/usr/share/pixmaps/$(PKGSNAME2); \
fi; \
done
for f in icons/*.gif icons/*.png icons/*.xpm; do \
if [ -f "$$f" ]; then \
install -m 644 "$$f" $(CURDIR)/debian/$(PACKAGE)/usr/share/pixmaps/$(PKGSNAME2)/small; \
fi; \
done
binary-indep: install
dh_testdir
dh_testroot
dh_installdocs
dh_installexamples debian/dot.w3m*
dh_installemacsen
dh_installinfo doc/emacs-w3m.info* doc/emacs-w3m-ja.info*
dh_installchangelogs ChangeLog
dh_link
dh_compress --exclude=.el
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch:
binary: binary-indep binary-arch
.PHONY: build-indep build-arch build clean binary-indep binary-arch binary install configure
|