Commit c8a2e657 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

Adapt debian directory generated by deb-build.sh to Qt 5/KDE 5.

parent c96c80ba
#!/bin/sh
#!/bin/bash
# Build Debian package.
test -d debian && rm -rf debian
cp -R deb debian
......@@ -8,6 +8,43 @@ cp -R deb debian
ppaversion=$1
if test -n "$ppaversion"; then
distribution=${ppaversion%%[0-9]*}
if which ubuntu-distro-info >/dev/null; then
if distrib_nr=$(ubuntu-distro-info --series=$distribution -r 2>/dev/null); then
distrib_nr=${distrib_nr/./}
distrib_id=Ubuntu
elif distrib_nr=$(debian-distro-info --series=$distribution -r 2>/dev/null); then
distrib_nr=${distrib_nr%.*}
distrib_id=Debian
else
echo "Could not find release number for $distribution"
fi
else
echo "distro-info is not installed"
fi
else
distribution=$(lsb_release -sc)
distrib_nr=$(lsb_release -sr)
distrib_nr=${distrib_nr/./}
distrib_id=$(lsb_release -si)
fi
if test $distrib_id = "Ubuntu" -a $distrib_nr -ge 1504 ||
test $distrib_id = "Debian" -a $distrib_nr -ge 9; then
qtversion=5
else
qtversion=4
fi
if test "$qtversion" = "5"; then
sed -i -e '/# KDE 4 BEGIN/,/# KDE 4 END/{/# KDE/b;s/^/#/};/# KDE 5 BEGIN/,/# KDE 5 END/{/# KDE/b;s/^#//}' \
debian/control debian/rules debian/kid3.install
fi
if test "$distribution" = "squeeze"; then
sed -i '/lib\(av\|chromaprint\)/ d' debian/control
sed -i 's/-DWITH_MP4V2=/-DWITH_CHROMAPRINT=OFF -DWITH_MP4V2=/; s/dh_builddeb -- -Zxz/dh_builddeb/' debian/rules
fi
if test -n "$ppaversion"; then
version=$(sed -e 's/^kid3 (\([0-9\.-]\+\).*$/\1/;q' debian/changelog)
DEBEMAIL="Urs Fleisch <ufleisch@users.sourceforge.net>" \
dch --newversion=${version}${ppaversion} --distribution=$distribution --urgency=low \
......@@ -18,9 +55,5 @@ if test -n "$ppaversion"; then
echo "cd ..; dput ppa:ufleisch/kid3 kid3_${version}${ppaversion}_source.changes"
else
rm -rf debian/source debian/watch
if test "$(lsb_release -sc)" = "squeeze"; then
sed -i '/lib\(av\|chromaprint\)/ d' debian/control
sed -i 's/-DWITH_MP4V2=/-DWITH_CHROMAPRINT=OFF -DWITH_MP4V2=/; s/dh_builddeb -- -Zxz/dh_builddeb/' debian/rules
fi
dpkg-buildpackage -rfakeroot
debuild
fi
......@@ -5,12 +5,14 @@ Maintainer: Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>
Uploaders: Mark Purcell <msp@debian.org>,
Patrick Matthäi <pmatthaei@debian.org>
Build-Depends: debhelper (>= 9),
# KDE 4
# KDE 4 BEGIN
libqt4-dev, kdelibs5-dev,
# KDE 5
# KDE 4 END
# KDE 5 BEGIN
# extra-cmake-modules, kio-dev, kdoctools-dev,
# qtmultimedia5-dev, qtdeclarative5-dev, qttools5-dev,
# qttools5-dev-tools, qtdeclarative5-dev-tools, qml-module-qtquick2,
# KDE 5 END
cmake,
libid3-3.8.3-dev,
libflac++-dev,
......
/usr/bin/kid3
/usr/share/appdata/kid3.appdata.xml
/usr/share/icons/hicolor/*/apps/kid3.*
# KDE 4
# KDE 4 BEGIN
/usr/share/applications/kde4/kid3.desktop
/usr/share/doc/kde/HTML/*/kid3/*
/usr/share/kde4/apps/kid3/kid3ui.rc
# KDE 5
# KDE 4 END
# KDE 5 BEGIN
#/usr/share/applications/kid3.desktop
#/usr/share/doc/HTML/*/kid3/*
#/usr/share/kxmlgui5/kid3/kid3ui.rc
# KDE 5 END
......@@ -9,6 +9,16 @@ DEB_CMAKE_PREFIX = /usr
DEB_CONFIG_INSTALL_DIR = $(DEB_CMAKE_PREFIX)/share/kde4/config
DEB_HTML_INSTALL_DIR = $(DEB_CMAKE_PREFIX)/share/doc/kde/HTML
# KDE 4 BEGIN
BASE_CMAKE_DEFS = -DCONFIG_INSTALL_DIR=$(DEB_CONFIG_INSTALL_DIR) \
-DDATA_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/share/kde4/apps \
-DHTML_INSTALL_DIR=$(DEB_HTML_INSTALL_DIR) \
-DKCFG_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/share/kde4/config.kcfg
# KDE 4 END
# KDE 5 BEGIN
#BASE_CMAKE_DEFS = -DWITH_QT5=ON
# KDE 5 END
%:
dh $@ --parallel --builddirectory=kid3-build
......@@ -16,10 +26,7 @@ override_dh_auto_configure:
dh_auto_configure -- \
-DSYSCONF_INSTALL_DIR=/etc \
-DCMAKE_INSTALL_PREFIX=$(DEB_CMAKE_PREFIX) \
-DCONFIG_INSTALL_DIR=$(DEB_CONFIG_INSTALL_DIR) \
-DDATA_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/share/kde4/apps \
-DHTML_INSTALL_DIR=$(DEB_HTML_INSTALL_DIR) \
-DKCFG_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/share/kde4/config.kcfg \
$(BASE_CMAKE_DEFS) \
-DLIB_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/lib/kid3 \
-DCMAKE_C_COMPILER:FILEPATH="$(CC)" \
-DCMAKE_CXX_COMPILER:FILEPATH="$(CXX)" \
......@@ -33,7 +40,9 @@ override_dh_auto_build:
override_dh_auto_install:
dh_auto_install
# KDE 4 BEGIN
-rm $(CURDIR)/debian/tmp/usr/share/doc/kde/HTML/*/kid3/common
# KDE 4 END
override_dh_makeshlibs:
dh_makeshlibs --noscripts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment