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
|
#!/usr/bin/make -f
# Include dpatch targets
include /usr/share/dpatch/dpatch.make
# Python helper
-include /usr/share/python/python.mk
# Define CFLAGS
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS = -Wall -g -O0
else
CFLAGS = -Wall -g -O2
endif
# All available python versions (python-support)
PYVERS := $(shell pyversions -rv)
configure: configure-stamp
configure-stamp:
cmake -DNO_PYMUCIPHER=1 \
-DBINDINGS=0 \
-DMURMUR=1 \
-DMUCOUS=1 \
-DCLIENTS=1 \
-DPREFIX=/usr \
-DCMAKE_C_FLAGS="$(CFLAGS)" \
-DCMAKE_CXX_FLAGS="$(CFLAGS)" \
-DMANDIR=share/man \
-DCMAKE_VERBOSE_MAKEFILE=1
touch $@
build: patch configure build-all $(PYVERS:%=build-python%)
build-all: build-all-stamp
build-all-stamp:
dh_testdir
$(MAKE)
touch $@
$(PYVERS:%=build-python%): build-all-stamp $(PYVERS:%=build-python%-stamp)
build-python%-stamp:
cd $(CURDIR)/Mucipher/PyMucipher && \
CFLAGS="$(CFLAGS)" python$* setup.py build
touch $@
clean: unpatch
dh_testdir
dh_testroot
[ ! -f Makefile ] || $(MAKE) clean
rm -rf Mucipher/PyMucipher/build \
python-bindings/build \
configure-stamp \
build-all-stamp \
build-python*-stamp \
install-all-stamp \
CMakeFiles \
CMakeCache.txt \
Mucipher/PyMucipher/mucipher_wrap.cpp \
Mucipher/PyMucipher/mucipherc.py \
cmake_install.cmake \
config.h \
install_manifest.txt \
system.h
find Mucipher Muhelp muscan museeq python-clients \
scripts mucous murmur museekd NewNet python-bindings setup \
-type f \( -name '*.cmake' -o -name '*.make' \) -exec rm -f {} \;
find . -type f \( -name 'depend.internal' -o -name 'link.txt' \
-o -name 'Makefile' -o -name 'C.includecache' -o -name 'CXX.includecache' \
-o -name progress.marks \) -exec rm -f {} \;
dh_clean
install: build install-prereq install-all $(PYVERS:%=install-python%)
install-prereq:
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
install-all: install-all-stamp
install-all-stamp: install-prereq
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
# Remove applications, icons, pixmaps...
rm -rf $(CURDIR)/debian/tmp/usr/share/applications \
$(CURDIR)/debian/tmp/usr/share/pixmaps \
$(CURDIR)/debian/tmp/usr/share/icons
# Remove extra license files
rm -f $(CURDIR)/debian/tmp/usr/share/museek/museeq/themes/default/COPYING
rm -f $(CURDIR)/debian/tmp/usr/share/museek/museeq/themes/humanity/COPYING
rm -f $(CURDIR)/debian/tmp/usr/share/museek/museeq/themes/tango/COPYING
# [Murmur] Create all size PNG/XPM icons
mkdir -p $(CURDIR)/debian/murmur/usr/share/pixmaps
for size in 16 22 24 32 36 48 64; do \
convert $(CURDIR)/murmur/images/murmur-96px.png -resize $${size} $(CURDIR)/debian/murmur/usr/share/pixmaps/murmur-$${size}.xpm || exit 1; \
mkdir -p $(CURDIR)/debian/murmur/usr/share/icons/hicolor/$${size}x$${size}/apps || exit 1; \
convert $(CURDIR)/murmur/images/murmur-96px.png -resize $${size} $(CURDIR)/debian/murmur/usr/share/icons/hicolor/$${size}x$${size}/apps/murmur.png || exit 1; \
done
# [Musetup-GTK] Create all size PNG/XPM icons
mkdir -p $(CURDIR)/debian/musetup-gtk/usr/share/pixmaps
for size in 16 22 24 32 36 48 64; do \
convert $(CURDIR)/icons/musetup-gtk.png -resize $${size} $(CURDIR)/debian/musetup-gtk/usr/share/pixmaps/musetup-gtk-$${size}.xpm || exit 1; \
mkdir -p $(CURDIR)/debian/musetup-gtk/usr/share/icons/hicolor/$${size}x$${size}/apps || exit 1; \
convert $(CURDIR)/icons/musetup-gtk.png -resize $${size} $(CURDIR)/debian/musetup-gtk/usr/share/icons/hicolor/$${size}x$${size}/apps/musetup-gtk.png || exit 1; \
done
# [Museeq] Create all size PNG/XPM icons
mkdir -p $(CURDIR)/debian/museeq/usr/share/pixmaps
for size in 16 22 24 32 36 48 64; do \
convert $(CURDIR)/museeq/museeq.png -resize $${size} $(CURDIR)/debian/museeq/usr/share/pixmaps/museeq-$${size}.xpm || exit 1; \
mkdir -p $(CURDIR)/debian/museeq/usr/share/icons/hicolor/$${size}x$${size}/apps || exit 1; \
convert $(CURDIR)/museeq/museeq.png -resize $${size} $(CURDIR)/debian/museeq/usr/share/icons/hicolor/$${size}x$${size}/apps/museeq.png || exit 1; \
done
touch $@
# Install .desktop entries
install -D -m644 $(CURDIR)/debian/museeq.desktop $(CURDIR)/debian/museeq/usr/share/applications/museeq.desktop
install -D -m644 $(CURDIR)/debian/murmur.desktop $(CURDIR)/debian/murmur/usr/share/applications/murmur.desktop
install -D -m644 $(CURDIR)/debian/musetup-gtk.desktop $(CURDIR)/debian/musetup-gtk/usr/share/applications/musetup-gtk.desktop
$(PYVERS:%=install-python%): $(PYVERS:%=install-python%-stamp)
install-python%-stamp: install-all-stamp
cd $(CURDIR)/Mucipher/PyMucipher && \
python$* setup.py install --root=$(CURDIR)/debian/tmp --no-compile $(py_setup_install_args)
cd $(CURDIR)/python-bindings && \
python$* setup.py install --root=$(CURDIR)/debian/tmp --no-compile $(py_setup_install_args)
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_install --sourcedir=$(CURDIR)/debian/tmp
dh_installman
dh_installmenu
dh_pysupport
dh_link
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary-indep:
# Nothing to do #
binary: binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|