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
|
#!/usr/bin/make -f
# -*- makefile -*-
#package=siag
#export LC_ALL=C
topdir=$(shell pwd)
debdir=${topdir}/debian
builddir=${debdir}/BUILD
tmpdir=${debdir}/tmp
siaghome=${tmpdir}/usr/share/siag
docdir=${tmpdir}/usr/share/doc
siagdocs=${docdir}/siagoffice-common
configure-stamp:
dh_testdir
mkdir -p ${builddir}
(cd ${builddir} && \
XAWLIB=-lXaw3d LDFLAGS=-L/usr/lib/python1.5/config \
${topdir}/configure --prefix=/usr \
--libexecdir=/usr/lib --with-tcl=tcl8.0)
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
${MAKE} -C ${builddir}
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
-${MAKE} -C ${builddir} distclean
rm -rf ${builddir}
dh_clean
binary-indep: build
dh_testdir -i
dh_testroot -i
dh_clean -k -i
dh_installdirs -i
${MAKE} -C ${builddir} install DESTDIR=${tmpdir}
# correct name for main docdir
mkdir -p ${docdir}
(cd ${docdir} && \
mv siag siagoffice-common && \
ln -s siagoffice-common siag-common && \
ln -s siagoffice-common siag)
# FIXME: remove unwanted files which went into doc
(cd ${siagdocs} && rm */*.scm)
# remove full GPL, use symlinks
# FIXME: depth changes can break relative symlinks
find ${siagdocs} -name COPYING -exec rm -f {} \; \
-exec ln -s ../../../common-licenses/GPL {} \;
find ${siagdocs} -name COPYING.LIB -exec rm -f {} \; \
-exec ln -s ../../../common-licenses/LGPL {} \;
# removed with siag 3.1.22:
# (cd ${siagdocs} && rm common/Copyright)
# remove arch-dep plugins
rm -rf ${tmpdir}/usr/libexec
# remove files from arch-dep packages
(cd ${siaghome} && rm -rf egon pw)
(cd ${siagdocs} && rm -rf egon pw)
mkdir -p ${tmpdir}/usr/share/man/man1
(cd ${tmpdir}/usr/bin && rm -f egon pw siag tsiag)
(cd ${tmpdir}/usr/share/man/man1 && rm -f egon.1* pw.1* *siag.1* *plugin.1*)
# standardize changelog filename
ln -s siag/CHANGES.gz ${siagdocs}/changelog.gz
# changelog symlinks for [xt]siag in siag-common
ln -s CHANGES.gz ${siagdocs}/siag/changelog.gz
ln -s ../changelog.Debian.gz ${siagdocs}/siag/
dh_movefiles -i
# remove empty dirs
-(cd ${tmpdir} && rmdir -p usr/share/siag/siag/)
#(cd ${tmpdir} && rm -ri usr/share/siag/siag/)
-(cd ${siagdocs} && rmdir -p examples/siag/ siag/)
#(cd ${siagdocs} && rm -ri examples/siag/ siag/)
mkdir -p ${debdir}/siag-common/usr/share/doc-base
install -m644 ${debdir}/siag-common.docbase ${debdir}/siag-common/usr/share/doc-base/siag
#dh_installdocs -p siagoffice-common
#dh_installchangelogs -p siagoffice-common
dh_compress -i -X examples
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary-arch: build
dh_testdir -a
dh_testroot -a
dh_clean -k -a
rm -rf ${tmpdir} # this is not cleaned by -a, as it is an arch-indep dir
dh_installdirs -a
${MAKE} -C ${builddir} install DESTDIR=${tmpdir}
# correct name for main docdir
(cd ${docdir} && mv siag siagoffice-common)
# FIXME: remove unwanted files which went into doc
(cd ${siagdocs} && rm */*.scm)
# remove dupplicate .scm files already in arch-indep
rm ${siaghome}/plugins/*.scm
for i in xsiag tsiag; do \
mkdir -p ${debdir}/$$i/usr/share/doc; \
ln -s siagoffice-common/siag ${debdir}/$$i/usr/share/doc/$$i; \
done
ln -s siagoffice-common/egon ${docdir}/egon
ln -s siagoffice-common/pw ${docdir}/xpw
ln -s siagoffice-common ${docdir}/siagoffice-plugins
# remove full GPL
find ${siagdocs} -name COPYING -exec rm -f {} \; \
-exec ln -s ../../../common-licenses/GPL {} \;
# remove things already in siag-common
(cd ${tmpdir} && rm -rf usr/share/siag/siag/)
#(cd ${tmpdir} && rm -ri usr/share/siag/siag/)
(cd ${siagdocs} && rm -rf examples/siag/ siag/)
#(cd ${siagdocs} && rm -ri examples/siag/ siag/)
dh_movefiles -a
dh_installdocs -pegon -pxpw
for i in xpw egon ; do \
mkdir -p ${debdir}/$$i/usr/share/doc-base; \
install -m644 ${debdir}/$$i.docbase ${debdir}/$$i/usr/share/doc-base/$$i; \
done
dh_installmenu -a
dh_undocumented -a
dh_installchangelogs -pegon -pxpw
for i in egon xpw; do \
( cd ${debdir}/$$i/usr/share/doc/$$i && mv CHANGES changelog ); \
done
dh_strip -a
# FIXME: this is not done by dh_strip
# strip ${tmpdir}/usr/lib/siag/plugins/*
dh_installdocs -p siagoffice-common
dh_installchangelogs -p siagoffice-common
dh_compress -a -X examples
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
# Below here is fairly generic really
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep clean
|