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
|
#!/usr/bin/make -f
# Keep this list of folders that are not included in the
# orig syncronized with the one in debian/source/local-options!
VERSIONFULL := $(shell dpkg-parsechangelog | grep -x "Version:.*" | sed 's@Version: \(.\+\)-.\+@\1@')
VERSION := $(shell echo $(VERSIONFULL) | sed 's@\(.\+\)+.\+@\1@')
ORIG_CONTENT := $(shell git ls-tree --name-only v$(VERSION) | grep -Ev '^(third_party|debian|\.git.*)')
# Don't enable pie, otherwise the unit tests don't work.
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
# Append CPPFLAGS, because cmake doesn't know that.
CFLAGS += $(CPPFLAGS)
CXXFLAGS += $(CPPFLAGS)
# Use this variable to allow options passed to cmake to be overridable
DEB_CMAKE_OPTIONS ?= -DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_C_FLAGS="$(CFLAGS)" \
-DCMAKE_CXX_FLAGS="$(CXXFLAGS)"
DEB_ASE_CMAKE_OPTIONS ?= -DENABLE_UPDATER:BOOL=OFF \
-DUSE_SHARED_CURL:BOOL=ON \
-DUSE_SHARED_GIFLIB:BOOL=ON \
-DUSE_SHARED_JPEGLIB:BOOL=ON \
-DUSE_SHARED_LIBPNG:BOOL=ON \
-DUSE_SHARED_ZLIB:BOOL=ON \
-DUSE_SHARED_TINYXML:BOOL=ON \
-DUSE_SHARED_GTEST:BOOL=ON \
-DUSE_SHARED_ALLEGRO4:BOOL=ON \
-DUSE_SHARED_LIBLOADPNG:BOOL=ON
%:
dh $@ --parallel
override_dh_auto_clean:
rm -rf build
override_dh_auto_configure:
rm -rf third_party
rm -rf src/allegro
rm -rf data/www
mkdir build && cd build && cmake $(DEB_CMAKE_OPTIONS) $(DEB_ASE_CMAKE_OPTIONS) ..
mkdir build/gtest && cd build/gtest && cmake $(DEB_CMAKE_OPTIONS) /usr/src/gtest
override_dh_auto_build:
dh_auto_build -Dbuild/gtest
dh_auto_build -Dbuild
override_dh_auto_test:
$(MAKE) --directory=build run_non_ui_tests
override_dh_auto_install:
dh_auto_install -Dbuild
install -D -m 644 data/icons/ase16.png debian/aseprite/usr/share/icons/hicolor/16x16/apps/aseprite.png
install -D -m 644 data/icons/ase32.png debian/aseprite/usr/share/icons/hicolor/32x32/apps/aseprite.png
install -D -m 644 data/icons/ase48.png debian/aseprite/usr/share/icons/hicolor/48x48/apps/aseprite.png
install -D -m 644 data/icons/ase64.png debian/aseprite/usr/share/icons/hicolor/64x64/apps/aseprite.png
override_dh_installchangelogs:
dh_installchangelogs -k debian/upstream-changelog
get-orig-source:
git archive --prefix=aseprite_$(VERSION)/ --format=tar v$(VERSION) $(ORIG_CONTENT) | gzip > ../aseprite_$(VERSIONFULL).orig.tar.gz
|