Add a basic support for the KDE Framework 5 packages

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2015-05-06 22:35:32 +02:00
parent 2fa427ff26
commit 970b29e4a1
6 changed files with 135 additions and 5 deletions

View File

@ -3,6 +3,10 @@
format_unpackaged_file_list_common="\
# python
s,^/usr/include/python3.3m,%{python3_inc},
# kde5
s,^/usr/include/KF5,%{_kde5_includedir},
s,^/usr/share/kf5,%{_kde5_datadir}/kf5,
s,^/usr/share/kservicetypes5,%{_kde5_servicetypesdir},
# generic translations
s,^/usr/bin,%{_bindir},
s,^/usr/sbin,%{_sbindir},
@ -37,7 +41,8 @@ s,^/opt/kde/share/mimelnk,%{_kde4_mimedir},
s,^/opt/kde/share/sounds,%{_kde4_soundsdir},
s,^/opt/kde/share/templates,%{_kde4_templatesdir},
s,^/opt/kde/share/wallpapers,%{_kde4_wallpaperdir},
s,^/opt/kde/share,%{_kde4_sharedir},"
s,^/opt/kde/share,%{_kde4_sharedir},
"
## conversion rules which are (target) architecture specific
@ -47,6 +52,10 @@ format_unpackaged_file_list_i586="\
s,^/opt/kde/lib/kde4/libexec,%{_kde4_libexecdir},
s,^/opt/kde/lib/kde4/plugins,%{_kde4_pluginsdir},
s,^/opt/kde/lib,%{_kde4_libdir},
# kde5
s,^/usr/lib/cmake/KF5,%{_kde5_libdir}/cmake/KF5,
s,^/usr/lib/libKF5,%{_kde5_libdir}/libKF5,
s,^/usr/lib/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K,
# python
s,^/usr/lib/python2.7/site-packages,%{python27_sitearch},
s,^/usr/lib/python3.3/site-packages,%{python3_sitearch},
@ -64,6 +73,10 @@ format_unpackaged_file_list_x86_64="\
s,^/opt/kde/lib64/kde4/libexec,%{_kde4_libexecdir},
s,^/opt/kde/lib64/kde4/plugins,%{_kde4_pluginsdir},
s,^/opt/kde/lib64,%{_kde4_libdir},
# kde5
s,^/usr/lib64/cmake/KF5,%{_kde5_libdir}/cmake/KF5,
s,^/usr/lib64/libKF5,%{_kde5_libdir}/libKF5,
s,^/usr/lib64/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K,
# python
s,^/usr/lib64/python2.7/site-packages,%{python27_sitearch},
s,^/usr/lib/python2.7/site-packages,%{python27_sitelib},

View File

@ -1,6 +1,6 @@
#!/bin/bash
# pck-update -- plugin for @package@
# Copyright (C) 2004-2014 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2004-2015 Davide Madrisan <davide.madrisan@gmail.com>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
@ -2179,6 +2179,8 @@ format_unpackaged_file_list_${target_cpu}"
[ -n "${!format_unpackaged_file_list_arch}" ] ||
notify.warning \
$"no arch-specific pattern translations for unpackaged files"
notify.debug "\
format_unpackaged_file_list_arch = $format_unpackaged_file_list_arch"
while read line; do
case "$line" in

View File

@ -1,6 +1,6 @@
#!/bin/bash
# pck-create -- plugin for @package@
# Copyright (C) 2004-2014 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2004-2015 Davide Madrisan <davide.madrisan@gmail.com>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; }
@ -111,6 +111,7 @@ function usage() {
gnome : "$"specfile for gnome packages""
kde3 : "$"specfile for kde3 packages""
kde4 : "$"specfile for kde4 packages""
kde5 : "$"specfile for kde5 packages""
library : "$"specfile for common library packages""
ocaml-libs : "$"specfile for OCaml library packages""
perl : "$"specfile for single-package perl modules""

View File

@ -838,6 +838,9 @@ msgstr "specfile per pacchetti kde3"
msgid "specfile for kde4 packages"
msgstr "specfile per pacchetti kde4"
msgid "specfile for kde5 packages"
msgstr "specfile per pacchetti kde5"
msgid "specfile for common library packages"
msgstr "specfile per librerie"

View File

@ -1,5 +1,5 @@
# Makefile for autospec
# Copyright (C) 2008,2011,2013 by Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2008,2011,2013,2015 by Davide Madrisan <davide.madrisan@gmail.com>
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
@ -18,7 +18,7 @@ srcdir = ..
include $(srcdir)/Makefile.env
pck_templates := ghc gnome kde3 kde4 library ocaml-libs perl python standard standard-daemon web
pck_templates := ghc gnome kde3 kde4 kde5 library ocaml-libs perl python standard standard-daemon web
all:

111
templates/kde5 Normal file
View File

@ -0,0 +1,111 @@
%define majver %(echo %version | cut -d. -f1-2)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: KDE Frameworks 5 ...
Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: http://www.kde.org
Source: ...
# Source: http://download.kde.org/stable/frameworks/%{majver}/...-%{version}.tar.xz
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRequires: rpm-macros-kde5
BuildRequires: extra-cmake-modules
## note: this list is just an example; modify as required
# BuildRequires: libQt5Core
# BuildRequires: libQt5Concurrent
# BuildRequires: libQt5DBus
# BuildRequires: libQt5Gui
# BuildRequires: libQt5Network
# BuildRequires: libQt5Script
# BuildRequires: libQt5Svg
# BuildRequires: libQt5Test
# BuildRequires: libQt5Widgets
# BuildRequires: libQt5X11Extras
# BuildRequires: libQt5Xml
BuildRoot: @rpm_default_buildroot@
%description
...
## remove the devel blocks if this package does not provide development stuff
%package devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
This package contains libraries and header files for developing applications that use %{name}.
@if:debug_package
%debug_package
@fi:debug_package
%prep
%setup -q
%build
%cmake_kde5 -d build
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
@if:i18n
%find_lang %{name}5_qt --with-qt --all-name || touch %{name}5_qt.lang
@fi:i18n
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
exit 0
%postun
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
exit 0
@if:i18n
%files -f %{name}5_qt.lang
@else:i18n
%files
@fi:i18n
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde5_bindir}/%{name}
# %{_kde5_datadir}/%{name}
# %{_kde5_libdir}/*.so
## note: "man3" pages normally goes to devel package if any
# %{_mandir}/man?/%{name}.*
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
## remove this block if the package does not provide development stuff
%files devel
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde5_includedir}/<KF5Framework>
# %{_kde5_includedir}/%{name}_version.h
# %{_kde5_libdir}/cmake/<KF5Framework>
# %{_kde5_libdir}/*.so
# %{_kde5_mkspecsdir}/qt_*.pri
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@