Commit 970b29e4a128d73686105fb049cf8b7236260757

Authored by Davide Madrisan
1 parent 2fa427ff26
Exists in master

Add a basic support for the KDE Framework 5 packages

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>

Showing 6 changed files with 135 additions and 5 deletions Side-by-side Diff

conf/04-rpmbuild-format-unpackaged-filelist.conf
... ... @@ -3,6 +3,10 @@
3 3 format_unpackaged_file_list_common="\
4 4 # python
5 5 s,^/usr/include/python3.3m,%{python3_inc},
  6 +# kde5
  7 +s,^/usr/include/KF5,%{_kde5_includedir},
  8 +s,^/usr/share/kf5,%{_kde5_datadir}/kf5,
  9 +s,^/usr/share/kservicetypes5,%{_kde5_servicetypesdir},
6 10 # generic translations
7 11 s,^/usr/bin,%{_bindir},
8 12 s,^/usr/sbin,%{_sbindir},
... ... @@ -37,7 +41,8 @@
37 41 s,^/opt/kde/share/sounds,%{_kde4_soundsdir},
38 42 s,^/opt/kde/share/templates,%{_kde4_templatesdir},
39 43 s,^/opt/kde/share/wallpapers,%{_kde4_wallpaperdir},
40   -s,^/opt/kde/share,%{_kde4_sharedir},"
  44 +s,^/opt/kde/share,%{_kde4_sharedir},
  45 +"
41 46  
42 47 ## conversion rules which are (target) architecture specific
43 48  
... ... @@ -47,6 +52,10 @@
47 52 s,^/opt/kde/lib/kde4/libexec,%{_kde4_libexecdir},
48 53 s,^/opt/kde/lib/kde4/plugins,%{_kde4_pluginsdir},
49 54 s,^/opt/kde/lib,%{_kde4_libdir},
  55 +# kde5
  56 +s,^/usr/lib/cmake/KF5,%{_kde5_libdir}/cmake/KF5,
  57 +s,^/usr/lib/libKF5,%{_kde5_libdir}/libKF5,
  58 +s,^/usr/lib/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K,
50 59 # python
51 60 s,^/usr/lib/python2.7/site-packages,%{python27_sitearch},
52 61 s,^/usr/lib/python3.3/site-packages,%{python3_sitearch},
... ... @@ -64,6 +73,10 @@
64 73 s,^/opt/kde/lib64/kde4/libexec,%{_kde4_libexecdir},
65 74 s,^/opt/kde/lib64/kde4/plugins,%{_kde4_pluginsdir},
66 75 s,^/opt/kde/lib64,%{_kde4_libdir},
  76 +# kde5
  77 +s,^/usr/lib64/cmake/KF5,%{_kde5_libdir}/cmake/KF5,
  78 +s,^/usr/lib64/libKF5,%{_kde5_libdir}/libKF5,
  79 +s,^/usr/lib64/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K,
67 80 # python
68 81 s,^/usr/lib64/python2.7/site-packages,%{python27_sitearch},
69 82 s,^/usr/lib/python2.7/site-packages,%{python27_sitelib},
plugins/pck-update.in
1 1 #!/bin/bash
2 2 # pck-update -- plugin for @package@
3   -# Copyright (C) 2004-2014 Davide Madrisan <davide.madrisan@gmail.com>
  3 +# Copyright (C) 2004-2015 Davide Madrisan <davide.madrisan@gmail.com>
4 4  
5 5 [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
6 6 { echo $"this script requires bash version 3 or better" >&2 && exit 1; }
... ... @@ -2179,6 +2179,8 @@
2179 2179 [ -n "${!format_unpackaged_file_list_arch}" ] ||
2180 2180 notify.warning \
2181 2181 $"no arch-specific pattern translations for unpackaged files"
  2182 + notify.debug "\
  2183 +format_unpackaged_file_list_arch = $format_unpackaged_file_list_arch"
2182 2184  
2183 2185 while read line; do
2184 2186 case "$line" in
plugins/spec-create.in
1 1 #!/bin/bash
2 2 # pck-create -- plugin for @package@
3   -# Copyright (C) 2004-2014 Davide Madrisan <davide.madrisan@gmail.com>
  3 +# Copyright (C) 2004-2015 Davide Madrisan <davide.madrisan@gmail.com>
4 4  
5 5 [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
6 6 { echo $"this script requires bash version 3 or better" >&2 && exit 1; }
... ... @@ -111,6 +111,7 @@
111 111 gnome : "$"specfile for gnome packages""
112 112 kde3 : "$"specfile for kde3 packages""
113 113 kde4 : "$"specfile for kde4 packages""
  114 + kde5 : "$"specfile for kde5 packages""
114 115 library : "$"specfile for common library packages""
115 116 ocaml-libs : "$"specfile for OCaml library packages""
116 117 perl : "$"specfile for single-package perl modules""
... ... @@ -838,6 +838,9 @@
838 838 msgid "specfile for kde4 packages"
839 839 msgstr "specfile per pacchetti kde4"
840 840  
  841 +msgid "specfile for kde5 packages"
  842 +msgstr "specfile per pacchetti kde5"
  843 +
841 844 msgid "specfile for common library packages"
842 845 msgstr "specfile per librerie"
843 846  
1 1 # Makefile for autospec
2   -# Copyright (C) 2008,2011,2013 by Davide Madrisan <davide.madrisan@gmail.com>
  2 +# Copyright (C) 2008,2011,2013,2015 by Davide Madrisan <davide.madrisan@gmail.com>
3 3  
4 4 # This program is free software; you can redistribute it and/or modify it under
5 5 # the terms of version 2 of the GNU General Public License as published by the
... ... @@ -18,7 +18,7 @@
18 18  
19 19 include $(srcdir)/Makefile.env
20 20  
21   -pck_templates := ghc gnome kde3 kde4 library ocaml-libs perl python standard standard-daemon web
  21 +pck_templates := ghc gnome kde3 kde4 kde5 library ocaml-libs perl python standard standard-daemon web
22 22  
23 23 all:
24 24  
  1 +%define majver %(echo %version | cut -d. -f1-2)
  2 +
  3 +Name: @pck_name@
  4 +Version: @pck_version@
  5 +Release: @spec_first_release@@DISTRO_rpm@
  6 +Summary: KDE Frameworks 5 ...
  7 +Group: ...
  8 +Vendor: @VENDOR@
  9 +Distribution: @DISTRO@
  10 +Packager: @packager_fullname@ <@packager_email@>
  11 +URL: http://www.kde.org
  12 +Source: ...
  13 +# Source: http://download.kde.org/stable/frameworks/%{majver}/...-%{version}.tar.xz
  14 +License: ...
  15 +## AUTOBUILDREQ-BEGIN
  16 +## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
  17 +## AUTOBUILDREQ-END
  18 +BuildRequires: cmake
  19 +BuildRequires: rpm-macros-kde5
  20 +BuildRequires: extra-cmake-modules
  21 +## note: this list is just an example; modify as required
  22 +# BuildRequires: libQt5Core
  23 +# BuildRequires: libQt5Concurrent
  24 +# BuildRequires: libQt5DBus
  25 +# BuildRequires: libQt5Gui
  26 +# BuildRequires: libQt5Network
  27 +# BuildRequires: libQt5Script
  28 +# BuildRequires: libQt5Svg
  29 +# BuildRequires: libQt5Test
  30 +# BuildRequires: libQt5Widgets
  31 +# BuildRequires: libQt5X11Extras
  32 +# BuildRequires: libQt5Xml
  33 +BuildRoot: @rpm_default_buildroot@
  34 +
  35 +%description
  36 +...
  37 +
  38 +## remove the devel blocks if this package does not provide development stuff
  39 +%package devel
  40 +Group: Development/Libraries
  41 +Summary: Development files for %{name}
  42 +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
  43 +
  44 +%description devel
  45 +This package contains libraries and header files for developing applications that use %{name}.
  46 +
  47 +@if:debug_package
  48 +%debug_package
  49 +@fi:debug_package
  50 +
  51 +%prep
  52 +%setup -q
  53 +
  54 +%build
  55 +%cmake_kde5 -d build
  56 +%make
  57 +
  58 +%install
  59 +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
  60 +%makeinstall -C build
  61 +
  62 +@if:i18n
  63 +%find_lang %{name}5_qt --with-qt --all-name || touch %{name}5_qt.lang
  64 +@fi:i18n
  65 +
  66 +%clean
  67 +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
  68 +
  69 +%post
  70 +@if:shared_libraries
  71 +## remove the following line if no dynamic libraries are provided by this package
  72 +/sbin/ldconfig
  73 +@fi:shared_libraries
  74 +exit 0
  75 +
  76 +%postun
  77 +@if:shared_libraries
  78 +## remove the following line if no dynamic libraries are provided by this package
  79 +/sbin/ldconfig
  80 +@fi:shared_libraries
  81 +exit 0
  82 +
  83 +@if:i18n
  84 +%files -f %{name}5_qt.lang
  85 +@else:i18n
  86 +%files
  87 +@fi:i18n
  88 +%defattr(-,root,root)
  89 +## note: this list is just an example; modify as required
  90 +# %{_kde5_bindir}/%{name}
  91 +# %{_kde5_datadir}/%{name}
  92 +# %{_kde5_libdir}/*.so
  93 +## note: "man3" pages normally goes to devel package if any
  94 +# %{_mandir}/man?/%{name}.*
  95 +@standard_docs@
  96 +## note: eventually add the remaining documents (if any)
  97 +# @standard_docs_devel@
  98 +
  99 +## remove this block if the package does not provide development stuff
  100 +%files devel
  101 +%defattr(-,root,root)
  102 +## note: this list is just an example; modify as required
  103 +# %{_kde5_includedir}/<KF5Framework>
  104 +# %{_kde5_includedir}/%{name}_version.h
  105 +# %{_kde5_libdir}/cmake/<KF5Framework>
  106 +# %{_kde5_libdir}/*.so
  107 +# %{_kde5_mkspecsdir}/qt_*.pri
  108 +
  109 +%changelog
  110 +* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
  111 +- @spec_changelog_comment@