Fixes for debian packaging

This commit is contained in:
Jonas Kvinge 2020-01-21 23:15:15 +01:00
parent 3fddfa075b
commit 5fd61725bd
6 changed files with 35 additions and 67 deletions

View File

@ -1,5 +1,15 @@
add_custom_target(deb find_program(LSB_RELEASE_EXEC lsb_release)
COMMAND cp -r -p ${CMAKE_SOURCE_DIR}/debian ${CMAKE_BINARY_DIR}/ find_program(DPKG_BUILDPACKAGE dpkg-buildpackage)
COMMAND dpkg-buildpackage -b -d -uc -us
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} if (LSB_RELEASE_EXEC AND DPKG_BUILDPACKAGE)
) execute_process(COMMAND /bin/sh "-c" "${LSB_RELEASE_EXEC} -cs"
OUTPUT_VARIABLE DEB_CODENAME
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (DEB_CODENAME)
add_custom_target(deb
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${DPKG_BUILDPACKAGE} -b -d -uc -us
)
endif()
endif()

2
debian/changelog.in vendored
View File

@ -1,4 +1,4 @@
strawberry (${STRAWBERRY_VERSION_DISPLAY}) unstable; urgency=low strawberry (${STRAWBERRY_VERSION_DISPLAY}-${DEB_CODENAME}) ${DEB_CODENAME}; urgency=low
* Version ${STRAWBERRY_VERSION_DISPLAY} * Version ${STRAWBERRY_VERSION_DISPLAY}

2
debian/compat vendored
View File

@ -1 +1 @@
9 11

6
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: strawberry
Section: sound Section: sound
Priority: optional Priority: optional
Maintainer: Jonas Kvinge <jonas@jkvinge.net> Maintainer: Jonas Kvinge <jonas@jkvinge.net>
Build-Depends: debhelper (>= 7), Build-Depends: debhelper (>= 11),
make, make,
cmake, cmake,
gcc, gcc,
@ -16,10 +16,8 @@ Build-Depends: debhelper (>= 7),
libasound2-dev, libasound2-dev,
libpulse-dev, libpulse-dev,
libtag1-dev, libtag1-dev,
libqt5-dev,
qtbase5-dev, qtbase5-dev,
qtbase5-dev-tools, qtbase5-dev-tools,
qtbase5-private-dev,
qttools5-dev, qttools5-dev,
libqt5x11extras5-dev, libqt5x11extras5-dev,
libgstreamer1.0-dev, libgstreamer1.0-dev,
@ -32,7 +30,7 @@ Build-Depends: debhelper (>= 7),
libusbmuxd-dev, libusbmuxd-dev,
libchromaprint-dev, libchromaprint-dev,
libfftw3-dev libfftw3-dev
Standards-Version: 3.9.8 Standards-Version: 4.2.1
Package: strawberry Package: strawberry
Architecture: any Architecture: any

View File

@ -11,7 +11,9 @@ ignore:
- /cmake/ - /cmake/
- /data/ - /data/
- /dist/ - /dist/
- /snap/
suffixes: suffixes:
- jpg - jpg
- png - png
- gif

70
debian/rules vendored
View File

@ -1,61 +1,19 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# -*- makefile -*-
MY_MAKEFLAGS= %:
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) dh $@ --buildsystem=cmake -builddirectory=build
NUMJOBS=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MY_MAKEFLAGS=-j$(NUMJOBS)
endif
configure: configure-stamp override_dh_auto_clean:
configure-stamp: rm -f dist/macos/Info.plist
dh_testdir rm -f dist/macos/create-dmg.sh
cmake .. \ rm -f dist/pacman/PKGBUILD
-DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/strawberry/usr rm -f dist/rpm/strawberry.spec
touch configure-stamp rm -f dist/scripts/maketarball.sh
rm -f dist/windows/strawberry.nsi
rm -f src/translations/translations.pot
dh_auto_clean
build: build-stamp override_dh_installchangelogs:
build-stamp: configure-stamp dh_installchangelogs Changelog
dh_testdir
make $(MY_MAKEFLAGS)
touch $@
clean: override_dh_auto_test:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
-make clean
-rm Makefile src/Makefile
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
make install
binary-indep: install
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installmenu
dh_installdocs
dh_gconf
dh_link
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