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
|
#!/usr/bin/make -f
# debian/rules for GNUmed client.
# Andreas Tille, GPL
%:
dh $@ --with quilt
pkg=gnumed
client=$(pkg)-client
override_dh_install:
dh_install
# 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
# Install locale files into apropriate directories
for loc in `ls client/locale/*.mo` ; do \
country=`echo $${loc} | sed -e 's?.*/\([a-z][a-z]\)-$(pkg).mo?\1?' -e 's?.*/\([a-z][a-z]_[A-Z][A-Z]\)-gnumed.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 \{\} \;
# Remove appendix .py from gm_ctl_client
cp -a client/connectors/gm_ctl_client.py debian/$(client)/usr/bin/gm_ctl_client
override_dh_pysupport:
dh_pysupport /usr/share/gnumed/Gnumed
|