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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
|
#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Also some stuff taken from debmake scripts, by Cristopt Lameter.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CC=cc
ifndef PERL
PERL = /usr/bin/perl
endif
TMPDIR =`pwd`/debian/tmp
archlib =`$(PERL) -MConfig -e 'print $$Config{installarchlib}'`
config =INSTALLMAN1DIR=$(TMPDIR)/usr/share/man/man1 INSTALLMAN3DIR=$(TMPDIR)/usr/share/man/man3 INSTALLPRIVLIB=$(TMPDIR)/usr/lib/perl5 INSTALLARCHLIB=$(TMPDIR)$(archlib)
build: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
sed -e 's/$$(OUTPUT_OPTION)//' lib/Makefile >lib/Makefile.new
mv -f lib/Makefile.new lib/Makefile
$(MAKE) -C lib soall CFLAGS="-O -D_REENTRANT"
(cd lib &&\
$(CC) -shared -Wl,-soname,libsufary.so.2 -o libsufary.so.2.0 file.so search.so -lc &&\
ln -s libsufary.so.2.0 libsufary.so)
$(MAKE) -C array all
(cd array &&\
ln -s ../lib/libsufary.so.2.0 libsufary.so.2 &&\
$(CC) -O -lm -o array array-main.o array-misc.o array-show.o libsufary.so.2)
$(MAKE) -C mkary all
$(MAKE) -C mkdid all
(cd mkdid &&\
ln -s ../lib/libsufary.so.2.0 libsufary.so.2 &&\
$(CC) -O -lm -o mkdid mkdid.o libsufary.so.2)
$(MAKE) -C tools all
(cd tools &&\
ln -s ../lib/libsufary.so.2.0 libsufary.so.2 &&\
$(CC) -O -lm -o sass sass.o libsufary.so.2 &&\
$(CC) -O -lm -o af af.o libsufary.so.2)
(cd perl/SUFARY &&\
$(PERL) ./Makefile.PL $(config) &&\
$(MAKE) OBJECT=SUFARY.o LD_RUN_PATH="")
(cd perl/DID &&\
$(PERL) ./Makefile.PL $(config) &&\
$(MAKE) LD_RUN_PATH="")
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
# Add here commands to clean up after the build process.
-$(MAKE) clean
-$(MAKE) -C perl/SUFARY distclean
-$(MAKE) -C perl/DID distclean
-rm lib/libsufary.so array/libsufary.so.2 mkdid/libsufary.so.2 tools/libsufary.so.2
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tmp.
# sufary
cp array/array mkary/mkary mkdid/mkdid tools/af tools/sass\
$(TMPDIR)/usr/bin
mv $(TMPDIR)/usr/bin/af $(TMPDIR)/usr/bin/sufary-af
cp debian/array.1 $(TMPDIR)/usr/share/man/man1
(cd $(TMPDIR)/usr/share/man/man1 &&\
ln -s array.1.gz mkary.1.gz &&\
ln -s array.1.gz tba2ary.1.gz &&\
ln -s array.1.gz mkdid.1.gz &&\
ln -s array.1.gz sufary-af.1.gz &&\
ln -s array.1.gz sass.1.gz)
$(PERL) doc/txt2txt.perl doc/MakeIndex.txt\
>$(TMPDIR)/usr/share/doc/sufary/MakeIndex.txt
$(PERL) doc/txt2txt.perl doc/Tools.txt\
>$(TMPDIR)/usr/share/doc/sufary/Tools.txt
sed -e '1s;local/;;'\
-e '/^\$$SADIR/d'\
-e '/mkdid/s;\$$SADIR/mkdid;/usr/bin;' mkdid/mkdids.perl\
>$(TMPDIR)/usr/share/doc/sufary/examples/mkdids.perl
chmod 755 $(TMPDIR)/usr/share/doc/sufary/examples/mkdids.perl
cp CHANGES2.0-2.1 doc/changes_old/CHANGES* $(TMPDIR)/usr/share/doc/sufary/changes/
# libsufary2
cp lib/libsufary.so.2.0 debian/libsufary2/usr/lib
(cd debian/libsufary2/usr/lib &&\
ln -s libsufary.so.2.0 libsufary.so.2)
# sufary-dev
cp lib/sufary.h debian/sufary-dev/usr/include
cp lib/libsufary.a debian/sufary-dev/usr/lib
(cd debian/sufary-dev/usr/lib &&\
ln -s libsufary.so.2.0 libsufary.so)
perl doc/txt2txt.perl doc/ReferenceC.txt\
>debian/sufary-dev/usr/share/doc/sufary-dev/ReferenceC.txt
# libsufary-perl
$(MAKE) -C perl/SUFARY PREFIX=`pwd`/debian/libsufary-perl/usr pure_perl_install
$(MAKE) -C perl/DID PREFIX=`pwd`/debian/libsufary-perl/usr pure_perl_install
perl doc/txt2txt.perl doc/ReferenceP.txt\
>debian/libsufary-perl/usr/share/doc/libsufary-perl/ReferenceP.txt
find debian/libsufary-perl -type f -name .packlist | xargs rm -f
mv debian/libsufary-perl/usr/lib/perl/5.* debian/libsufary-perl/usr/share/perl5
rm -r debian/libsufary-perl/usr/lib/perl debian/libsufary-perl/usr/share/perl
# sufary-tcltk
cp kwicview/fileselecter.tcl kwicview/tclIndex \
debian/sufary-tcltk/usr/share/sufary/kwicview/
cp kwicview/help/*.html \
debian/sufary-tcltk/usr/share/sufary/kwicview/help
sed -e '1s;local/bin/wish;bin/wish;' kwicview/online_help.tcl\
> debian/sufary-tcltk/usr/share/sufary/kwicview/online_help.tcl
chmod 755 debian/sufary-tcltk/usr/share/sufary/kwicview/online_help.tcl
sed -e '1s;local/bin/wish;bin/wish;'\
-e '/^set sufary_path/s;auto/home/tatuo-y/work/sufary;usr/share;'\
-e '/auto_path/s;\$$sufary_path;/usr/share/sufary;'\
-e '/^set arraybin/s;\$$sufary_path/array;/usr/bin;'\
-e '/^kanji/s/^/#/'\
-e '/kanji string/s//string/g'\
-e '/^ *option add/s/^/#/'\
kwicview/kwicview >debian/sufary-tcltk/usr/bin/kwicview
chmod 755 debian/sufary-tcltk/usr/bin/kwicview
cp debian/kwicview.1 debian/sufary-tcltk/usr/share/man/man1/
dh_movefiles
touch install-stamp
# Build architecture-independent files here.
binary-indep: build install
# dh_testversion
dh_testdir -i
dh_testroot -i
dh_installdocs -i
dh_installexamples -i
dh_installmenu -i
# dh_installemacsen -i
# dh_installinit -i
dh_installcron -i
# dh_installmanpages -i
# dh_undocumented
dh_installchangelogs -i
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
# dh_testversion
dh_testdir -a
dh_testroot -a
dh_installdocs -a
dh_installexamples -a
dh_installmenu -a
# dh_installemacsen -a
# dh_installinit -a
dh_installcron -a
dh_installmanpages -psufary kwicview.1
# dh_undocumented
dh_installchangelogs ChangeLog
dh_strip -a
dh_link -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
# LD_LIBRARY_PATH=debian/libsufary2/usr/lib dh_shlibdeps -a
dh_gencontrol -a
dh_makeshlibs -a
dh_md5sums -a
dh_builddeb -a
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|