#!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)") MANPAGES := $(wildcard $(CURDIR)/*.*.xml) %: dh $@ override_dh_clean: dh_clean *.1 override_dh_auto_build: # Create man page from DocBook XML for x in $(MANPAGES) ; do \ docbook2x-man --string-param header-3="$(BUILD_DATE)" $$x ; \ done override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) python3 -m flake8 shellcheck *.sh endif override_dh_auto_install: dh_auto_install install -o root -g root -d $(CURDIR)/debian/josm-installer/usr/bin install -o root -g root -m 755 $(CURDIR)/josm $(CURDIR)/debian/josm-installer/usr/bin/josm install -o root -g root -m 755 $(CURDIR)/josm-installer.py $(CURDIR)/debian/josm-installer/usr/bin/josm-installer install -o root -g root -d $(CURDIR)/debian/josm-installer/lib/systemd/system install -o root -g root -m 644 $(CURDIR)/josm-installer.service $(CURDIR)/debian/josm-installer/lib/systemd/system/josm-installer.service install -o root -g root -m 644 $(CURDIR)/josm-installer.timer $(CURDIR)/debian/josm-installer/lib/systemd/system/josm-installer.timer install -o root -g root -d $(CURDIR)/debian/josm-installer/usr/share/josm install -o root -g root -m 644 $(CURDIR)/placeholder $(CURDIR)/debian/josm-installer/usr/share/josm/.placeholder install -o root -g root -d $(CURDIR)/debian/josm-installer/etc/default install -o root -g root -m 644 $(CURDIR)/linux/tested/etc/default/josm $(CURDIR)/debian/josm-installer/etc/default/josm for size in 512x512 256x256 192x192 128x128 96x96 80x80 72x72 64x64 48x48 42x42 40x40 36x36 32x32 24x24 22x22 16x16 8x8; do \ install -o root -g root -d $(CURDIR)/debian/josm-installer/usr/share/icons/hicolor/$${size}/apps ; \ install -o root -g root -m 644 $(CURDIR)/linux/tested/usr/share/icons/hicolor/$${size}/apps/org.openstreetmap.josm.png $(CURDIR)/debian/josm-installer/usr/share/icons/hicolor/$${size}/apps/org.openstreetmap.josm.png ; \ done install -o root -g root -d $(CURDIR)/debian/josm-installer/usr/share/icons/hicolor/scalable/apps install -o root -g root -m 644 $(CURDIR)/linux/tested/usr/share/icons/hicolor/scalable/apps/org.openstreetmap.josm.svg $(CURDIR)/debian/josm-installer/usr/share/icons/hicolor/scalable/apps/org.openstreetmap.josm.svg install -o root -g root -m 644 $(CURDIR)/linux/tested/usr/share/pixmaps/org.openstreetmap.josm.png $(CURDIR)/debian/josm-installer/usr/share/pixmaps/org.openstreetmap.josm.png install -o root -g root -m 644 $(CURDIR)/linux/tested/usr/share/applications/org.openstreetmap.josm.desktop $(CURDIR)/debian/josm-installer/usr/share/applications/org.openstreetmap.josm.desktop install -o root -g root -m 644 $(CURDIR)/linux/tested/usr/share/metainfo/org.openstreetmap.josm.appdata.xml $(CURDIR)/debian/josm-installer/usr/share/metainfo/org.openstreetmap.josm.appdata.xml install -o root -g root -d $(CURDIR)/debian/josm-installer/usr/share/mime/packages install -o root -g root -m 644 $(CURDIR)/linux/tested/usr/share/mime/packages/josm.xml $(CURDIR)/debian/josm-installer/usr/share/mime/packages