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
|
#!/usr/bin/make -f
ICONS_SIZE=32
INKSCAPE_VER=$(shell dpkg -l inkscape | awk '/^ii/{print $$3;}')
INKSCAPE_OUT_OPT=$(shell dpkg --compare-versions "$(INKSCAPE_VER)" lt "1.0~rc1" && echo "-e" || echo "-o")
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
KEYRING_PKG = -Vdist:Recommends="ubuntu-keyring"
else
SUBSTVARS = -Vdist:Depends="bar"
endif
# one ring to rule them all ...
%:
dh $@
override_dh_gencontrol:
if dpkg-vendor --derives-from Ubuntu; then \
echo 'misc:Recommends=ubuntu-keyring' >> debian/neurodebian-dev.substvars; fi
dh_gencontrol
override_dh_auto_configure:
override_dh_auto_build:
# wallpaper
mkdir -p build/wallpaper
convert -layers merge artwork/wallpaper_hotbrain.xcf build/wallpaper/neurodebian.png
# icons
mkdir -p build/icons
inkscape artwork/icon.svg -w $(ICONS_SIZE) -h $(ICONS_SIZE) \
$(INKSCAPE_OUT_OPT) build/icons/neurodebian.png
for d in electrophysiology psychophysics; do \
inkscape artwork/$$d.svg -w $(ICONS_SIZE) -h $(ICONS_SIZE) \
$(INKSCAPE_OUT_OPT) build/icons/neurodebian-$$d.png; done
cp artwork/icon.svg build/icons/neurodebian.svg
convert -geometry $(ICONS_SIZE)x$(ICONS_SIZE) artwork/mri.png build/icons/neurodebian-imaging.png
# manpages
mkdir -p build/man
help2man -h '--verbose-help' --no-info tools/backport-dsc \
-n "backport Debian source packages" > build/man/backport-dsc.1
help2man --no-info tools/nd-autoinstall \
-n "install (if necessary) and run an application" > build/man/nd-autoinstall.1
help2man --no-info tools/nd-configurerepo \
-n "configure APT to use NeuroDebian repository" > build/man/nd-configurerepo.1
override_dh_auto_install:
override_dh_auto_test:
override_dh_install:
dh_install
# shipped in a dedicated neurodebian-freeze package
rm -f debian/neurodebian-dev/usr/bin/nd_freeze
override_dh_clean:
debconf-updatepo
dh_clean
$(MAKE) -C artwork clean
|