Rev 19 | Rev 23 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DESTDIR=$(CURDIR)/debian/tmp
ICON_SIZES=16 22 32 48 64 96
PIXMAP_SIZES=16 32
include /usr/share/dpatch/dpatch.make
clean: clean-patched unpatch
dh_clean
clean-patched: patch-stamp
dh_testdir
dh_testroot
rm -f build-stamp
rm -f pyscrabble-*.png pyscrabble-*.xpm
python setup.py clean -a
find -name '*.pyc' -delete
build: patch-stamp
python setup.py build
for size in $(ICON_SIZES); do \
rsvg -h $$size -w $$size debian/pyscrabble.svg pyscrabble-$$size.png; \
done
for size in $(PIXMAP_SIZES); do \
convert pyscrabble-$$size.png pyscrabble-$${size}x$${size}.xpm; \
done
install: build
dh_testdir
dh_testroot
dh_clean -k
python setup.py install --no-compile --root=$(DESTDIR) \
--prefix=/usr \
--install-scripts=/usr/games \
--confdir=/etc/pyscrabble \
--logdir=/var/log/pyscrabble \
--dbdir=/var/lib/pyscrabble
install -m755 -d $(DESTDIR)/usr/sbin
mv $(DESTDIR)/usr/games/pyscrabble-main.py $(DESTDIR)/usr/games/pyscrabble
mv $(DESTDIR)/usr/games/server_console.py $(DESTDIR)/usr/sbin/pyscrabble-server
# rm $(DESTDIR)/usr/bin/db_upgrade.py
install -m755 -d $(DESTDIR)/usr/share/pixmaps
install -m644 pyscrabble-*.xpm $(DESTDIR)/usr/share/pixmaps
install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/scalable/apps
gzip < debian/pyscrabble.svg > $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/pyscrabble.svgz
for size in $(ICON_SIZES); do \
install -m755 -d $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \
install -m644 pyscrabble-$$size.png \
$(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/pyscrabble.png; \
done
install -d -m755 $(DESTDIR)/usr/share/applications/
install -m644 debian/pyscrabble.desktop $(DESTDIR)/usr/share/applications/
# Build architecture-dependent files here.
binary-arch:
# We have nothing to do by default.
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_install --sourcedir=debian/tmp
dh_link
dh_pycentral
dh_installchangelogs CHANGELOG.txt
dh_installdocs
dh_installexamples
dh_installman
dh_installinit -r
dh_installmenu
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure