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
|
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules for GNUmed client.
# Andreas Tille, GPL
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
pkg=gnumed
client=$(pkg)-client
PYDEF=$(shell pyversions -d)
PYVERS=$(shell pyversions -r)
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
#Architecture
build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: configure-stamp
touch build-arch-stamp
build-indep: build-indep-stamp
build-indep-stamp: configure-stamp
touch build-indep-stamp
clean:
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp
dh_clean configure-stamp
install: install-indep install-arch
install-indep:
dh_testdir
dh_testroot
dh_clean -k -i
dh_installdirs -i
dh_install -i
# Remove "#!/usr/bin/.*python" from Python scripts because they are
# called from wrappers and
# fix permission of scripts who are not handled above
for py in `find debian -name "*.py"` ; do \
if `grep -q "^#!/usr/bin/.*python" $$py` ; then \
grep -v "^#!/usr/bin/.*python" $${py} > $${py}~ ; \
touch -r $${py} $${py}~ ; \
mv -f $${py}~ $${py} ; \
else \
chmod 644 $${py} ; \
fi ; \
done
# The client directory contains certain files which are also needed
# by the server. These files have to be moved to the apropriate places.
# Because GNUmed is a quite moving target
# the files which are known to be needed in other packages in addition
# to the client package are moved now to appropriate places while all
# other files will be moved to the client package by debian/$(client).install
for helper in `ls debian/install_helper` ; do \
targetdir=debian/$${helper}/usr/share/python-support/$${helper}/Gnumed ; \
mkdir -p $${targetdir} ; \
for file in `grep -v "^[[:space:]]*#" debian/install_helper/$${helper}` ; do \
filename=`basename $${file}` ; \
srcfile=`find debian/$(client) -name $${filename} | grep $${file}` ; \
if [ _"$${srcfile}" = _"" ] ; then \
echo "Missing file $${file} for package $${helper}" ; exit -1 ; \
fi ; \
mkdir -p $${targetdir}/`dirname $${file}` ; \
if head -n 1 $${srcfile} | grep -q '^#!/' ; then \
sed '1d' $${srcfile} > $${targetdir}/$${file} ; \
rm -f $${srcfile} ; \
else \
mv $${srcfile} $${targetdir}/`dirname $${file}` ; \
fi ; \
chmod 644 $${targetdir}/$${file} ; \
done ; \
done
# Install locale files into apropriate directories
for loc in `ls client/locale/*.mo` ; do \
country=`echo $${loc} | sed 's?.*/\([a-z][a-z]\)-$(pkg).mo?\1?'` ; \
locdir=debian/$(client)/usr/share/locale/$${country}/LC_MESSAGES ; \
mkdir -p $${locdir} ; \
cp -a $${loc} $${locdir}/$(pkg).mo ; \
done ; \
# Remove programming templates if installed by chance ...
find debian -name "*.template" -exec rm -f \{\} \;
# Install lintian.overrides in gnumed-client-debug
cp -a debian/gnumed-client-debug.lintian.overrides debian/gnumed-client-debug/usr/share/lintian/overrides/gnumed-client-debug
# To update po files as recommended in po-debconf(7)
debian/po/templates.pot: $(templates)
@debconf-updatepo
get-orig-source:
wget http://savannah.gnu.org/download/gnumed/GNUmed-client.0.1-rc5.tgz
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
install-arch:
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
binary-common:
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installmenu
dh_installdebconf
# dh_installlogrotate
# dh_installcron
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
dh_pysupport
dh_python
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: DH_OPTIONS=-i
binary-indep: build-indep install-indep binary-common
# Build architecture dependant packages using the common target.
binary-arch: DH_OPTIONS=-a
binary-arch: build-arch install-arch binary-common
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
|