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
|
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
ifndef PERL
PERL = /usr/bin/perl
endif
DEST=$(CURDIR)/debian/swish-e
DOCDIR=$(DEST)/usr/share/doc/swish-e
clean:
dh_testdir
dh_testroot
dh_clean build.stamp
-( cd perl; $(MAKE) realclean)
-[ ! -f Makefile ] || $(MAKE) distclean
rm -f perl/t/index.swish-e* perl/Makefile.old
rm -f doc/swish-e.1 doc/swish-search.1 *.cgi.7
rm -f src/acconfig.h doc/bin/toc_file config.log
rm -f html/search.cgi debian/files
rm -f SWISH-Stemmer-0.05.tar.gz
build-indep:
build-arch: build
build: build.stamp
build.stamp:
dh_testdir
dh_update_autotools_config
env CC=gcc CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --mandir=\$${prefix}/share/man --with-libxml2 --prefix=/usr
$(MAKE)
(chmod 755 swish-config;cd perl; env PATH=..:$$PATH SWISHSKIPTEST=1 SWISHIGNOREVER=1 $(PERL) Makefile.PL INSTALLDIRS=vendor LDDLFLAGS="$(LDFLAGS) -shared" < /dev/null \
&& $(MAKE) OPTIMIZE="$(CFLAGS) -I../src/" CC=gcc LD=gcc LD_RUN_PATH=)
> $@
binary: binary-arch binary-indep
binary-arch: build
dh_testdir
dh_testroot
dh_clean
dh_installdirs
uudecode debian/SWISH-Stemmer-0.05.tar.gz.uu
make install DESTDIR=$(DEST)
sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
(cd perl;$(MAKE) install DESTDIR=$(DEST))
chmod u+rwX -R $(DEST)
(cd example;pod2man -s 7 swish.cgi >../swish.cgi.7 ;pod2man -s 7 search.cgi >../search.cgi.7)
dh_installman
dh_installdocs README*
dh_installexamples example/* conf filter-bin prog-bin SWISH-Stemmer-0.05.tar.gz
(cd $(DEST)/usr/bin; ln -s swish-e swish-search)
(cd $(DEST)/usr/share/man/man1; ln -s swish-e.1 swish-search.1)
mv $(DEST)/usr/bin/swish-filter-test $(DOCDIR)/examples/
find $(DOCDIR)/examples -name '*' -type d -exec chmod 755 {} +
find $(DOCDIR)/examples -name '*' -type f -exec chmod 644 {} +
find $(DOCDIR)/examples -name '*.in' -exec rm {} +
find $(DEST)/usr/lib/swish-e/perl -name '*.pm' -exec chmod 644 {} +
cp -f debian/swish_filter.pl $(DOCDIR)/examples/filter-bin/
chmod 755 $(DOCDIR)/examples/filter-bin/*.pl
chmod 755 $(DOCDIR)/examples/filter-bin/*.sh
rm -f $(DOCDIR)/README.cvs $(DOCDIR)/INSTALL
rm -f $(DOCDIR)/examples/prog-bin/*.in $(DOCDIR)/examples/prog-bin/Make*
rm -f $(DOCDIR)/examples/*.in $(DOCDIR)/examples/Make*
rm -f $(DOCDIR)/filter-bin/Make* $(DOCDIR)/conf/Make*
dh_movefiles --sourcedir=debian/swish-e
dh_installchangelogs
dh_strip
dh_compress -Xexamples
dh_installdebconf
dh_fixperms
dh_makeshlibs
dh_installdeb
dh_perl
dh_shlibdeps -l$(DEST)/usr/lib/
dh_gencontrol
dh_md5sums
dh_builddeb
binary-indep: build
.PHONY: clean build build-arch build-indep binary binary-arch binary-indep
|