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
|
#!/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.
package=fml
fmldir=./build-tree/fml-4.0.3
cfver0=
cfver1=$(shell perl -e 'require "./debian/default_config.ph"; print "$$CFVersion"')
build:
dh_testdir
# make CFLAGS="-O2 -g -Wall"
-test -d build-tree || mkdir build-tree
tar zxfC upstream/fml-4.0.3.dfsg.tar.gz build-tree
cat debian/patches/debian-patches | (cd $(fmldir) && patch -p1)
cp /usr/share/misc/config.guess $(fmldir)/sbin
cp /usr/share/misc/config.sub $(fmldir)/sbin
@cfver0=`perl -e 'require "$(fmldir)/src/default_config.ph"; print "$$CFVersion"'`; test "$$cfver0" = "$(cfver1)" || (echo "CFVersion mismatch: $$cfver0 != $(cfver1)"; false)
touch build-stamp
clean:
dh_testdir
dh_testroot
-rm -f build
-rm -rf debian/fml debian/files* core debian/substvars
-rm -rf debian/sbin debian/makefml
-rm -rf debian/fml-doc.files
dh_clean
-rm -rf build-tree
-rm build-stamp
binary-indep: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# do not init tty in makefml, so fix it
perl debian/fixmakefml $(fmldir)
# for sbin/config.guess
cd debian && rm -f sbin && ln -s ../$(fmldir)/sbin .
# XXX: for backward compatibility
dh_link usr/share/fml usr/lib/fml
# install to debian/fml
sh ./debian/fmlinst | (cd $(fmldir) && perl ../../debian/makefml install)
# fix paths
find debian/fml -type f -exec perl debian/fix-paths {} \;
-rm -f debian/fml/share/lib/fml/Configurations
-rm -f debian/fml/usr/share/fml/Configurations
dh_link usr/share/fml/.fml usr/share/fml/Configurations
perl debian/postinst build
# to fix default_config.ph become empty...
-rm -f debian/fml/usr/share/fml/default_config.ph
dh_link etc/fml/default_config.ph usr/share/fml/default_config.ph
install -m 644 debian/default_config.ph debian/fml/etc/fml/default_config.ph
# conffiles should be in etc
cd debian/fml && mv usr/share/fml/.fml/system etc/fml/system.defaults;
dh_link etc/fml/system.defaults usr/share/fml/.fml/system.defaults
install -m 644 debian/fmlconfig.ph debian/fml/etc/fml/
# /usr/sbin/makefml
install -m 755 debian/makefml.sh debian/fml/usr/bin/makefml
# /usr/sbin/fmlconfigure
install -m 755 debian/fmlconfigure debian/fml/usr/sbin/fmlconfigure
# contribs
(cd $(fmldir) && tar cf - contrib) | (cd debian/fml/usr/share/fml; tar xvf - )
# no need WINDOWS files
rm -rf debian/fml/usr/share/fml/sys/WINDOWS*
# remove obsoletes files
rm -rf debian/fml/usr/share/fml/contrib/localhack/release-1/vote
# remove jcode.pl
rm -f debian/fml/usr/share/fml/jcode.pl
# remove .cvsignore
find debian/fml -name .cvsignore -exec rm {} \;
# fix paths, again
find debian/fml/usr/share/fml/contrib -type f -exec perl debian/fix-paths {} \;
-rm -f debian/fml/usr/share/fml/Configurations
dh_link usr/share/fml/.fml/ usr/share/fml/Configurations
-rm -f debian/fml/usr/share/fml/.fml/.fml
# documents
# dh_installdocs ..
mv debian/fml/usr/share/fml/doc/* debian/fml/usr/share/doc/fml
rm -rf debian/fml/usr/lib/fml/doc
# these are installed as changelog by dh_installchangelogs
rm -f debian/fml/usr/share/doc/fml/CHANGES*
# COPYING
rm -f debian/fml/usr/share/doc/fml/COPYING*
rm -f debian/fml/usr/share/doc/fml/html/COPYING*
rm -rf debian/fml/usr/share/doc/fml/man
dh_installdocs
# XXX: undocumented man, THIS IS BUG!
# dh_undocumented makefml.8
# dh_undocumented fmlconfigure.8
# dh_installexamples `find sample -type f -print`
# dh_installmenu
# dh_installcron
# install manpages in debian/ dirs
dh_installman debian/makefml.1 debian/fml.8 debian/fmlconfigure.8
# dh_installinit
dh_installchangelogs $(fmldir)/doc/CHANGES.jp
cd debian/fml/usr/share/doc/fml && mv changelog changelog.ja
dh_installchangelogs $(fmldir)/doc/CHANGES.en
(cat debian/fml-doc.files.in; \
cd debian/fml && ( \
ls -1 usr/share/doc/fml/INSTALL*; \
ls -1 usr/share/doc/fml/UPGRADE.*; \
ls -1 usr/share/doc/fml/RELEASE_NOTES.*) \
) > debian/fml-doc.install
dh_install --source=debian/fml
-cat debian/fml-doc.install | while read d; \
do \
(cd debian/fml && rm -rf $$d); \
done
# dh_strip
dh_compress
dh_fixperms
chown -R list.list debian/fml/var/spool/ml
chmod -R 02775 debian/fml/var/spool/ml
#
# dh_suidregister
dh_installdeb
dh_perl
# dh_shlibdeps
dh_gencontrol
# dh_makeshlibs
dh_md5sums
dh_builddeb
binary-arch: build
#
# There are no architecture-dependent files to be uploaded
# generated by this package. If there were any they would be
# made here.
# Below here is fairly generic really
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep clean
|