| 1 |
#!/usr/bin/make -f
|
| 2 |
# debian/rules for GNUmed client.
|
| 3 |
# Andreas Tille, GPL
|
| 4 |
|
| 5 |
%:
|
| 6 |
dh $@ --with quilt --with python2
|
| 7 |
|
| 8 |
pkg=gnumed
|
| 9 |
client=$(pkg)-client
|
| 10 |
|
| 11 |
override_dh_install:
|
| 12 |
dh_install
|
| 13 |
|
| 14 |
# Remove "#!/usr/bin/.*python" from Python scripts because they are
|
| 15 |
# called from wrappers and
|
| 16 |
# fix permission of scripts who are not handled above
|
| 17 |
for py in `find debian -name "*.py"` ; do \
|
| 18 |
if `grep -q "^#!/usr/bin/.*python" $$py` ; then \
|
| 19 |
grep -v "^#!/usr/bin/.*python" $${py} > $${py}~ ; \
|
| 20 |
touch -r $${py} $${py}~ ; \
|
| 21 |
mv -f $${py}~ $${py} ; \
|
| 22 |
else \
|
| 23 |
chmod 644 $${py} ; \
|
| 24 |
fi ; \
|
| 25 |
done
|
| 26 |
|
| 27 |
# Install locale files into apropriate directories
|
| 28 |
for loc in `ls client/po/*.mo` ; do \
|
| 29 |
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?'` ; \
|
| 30 |
locdir=debian/$(client)/usr/share/locale/$${country}/LC_MESSAGES ; \
|
| 31 |
mkdir -p $${locdir} ; \
|
| 32 |
cp -a $${loc} $${locdir}/$(pkg).mo ; \
|
| 33 |
done ; \
|
| 34 |
|
| 35 |
# Remove programming templates if installed by chance ...
|
| 36 |
find debian -name "*.template" -exec rm -f \{\} \;
|
| 37 |
|
| 38 |
# Remove appendix .py from gm_ctl_client
|
| 39 |
cp -a client/connectors/gm_ctl_client.py debian/$(client)/usr/bin/gm_ctl_client
|
| 40 |
|
| 41 |
#override_dh_pysupport:
|
| 42 |
# dh_pysupport /usr/share/gnumed/Gnumed
|