Compare commits

...

6 Commits

7 changed files with 244 additions and 86 deletions

View File

@ -1,2 +1,2 @@
VERSION=1.25 VERSION=1.26
RELEASE=1mamba RELEASE=1mamba

View File

@ -1,13 +1,23 @@
## conversion rules for unpackaged files ## conversion rules for unpackaged files
format_unpackaged_file_list_common="\ format_unpackaged_file_list_common="\
s,^/usr/share/doc/,%{_docdir}/, # java
# python s,^/usr/share/java,%{_javadir},
s,^/usr/include/python3.3m,%{python3_inc}, # xdg
s,^/usr/share/metainfo,%{_metainfodir},
# qt5
s,^/usr/include/qt5,%{_qt5_headerdir},
s,^/usr/share/doc/qt5,%{_qt5_docdir},
# qt6
s,^/usr/include/qt6,%{_qt6_headerdir},
s,^/usr/share/doc/qt6,%{_qt6_docdir},
# kde5 # kde5
s,^/usr/include/KF5,%{_kde5_includedir}, s,^/usr/include/KF5,%{_kde5_includedir},
s,^/usr/share/kf5,%{_kde5_datadir}/kf5, s,^/usr/share/kf5,%{_kde5_datadir}/kf5,
s,^/usr/share/kservicetypes5,%{_kde5_servicetypesdir}, s,^/usr/share/kservicetypes5,%{_kde5_servicetypesdir},
# kf6
s,^/usr/include/KF6,%{_kf6_includedir},
s,^/usr/share/kf6,%{_kf6_datadir}/kf6,
# systemd # systemd
s,^/usr/lib/systemd/system,%{_unitdir}, s,^/usr/lib/systemd/system,%{_unitdir},
s,^/usr/lib/systemd/user,%{_userunitdir}, s,^/usr/lib/systemd/user,%{_userunitdir},
@ -29,6 +39,11 @@ s,^/usr/lib/systemd/system-generators,%{_systemdgeneratordir},
s,^/usr/lib/systemd/user-generators,%{_systemdusergeneratordir}, s,^/usr/lib/systemd/user-generators,%{_systemdusergeneratordir},
s,^/usr/lib/systemd/system-environment-generators,%{_systemd_system_env_generator_dir}, s,^/usr/lib/systemd/system-environment-generators,%{_systemd_system_env_generator_dir},
s,^/usr/lib/systemd/user-environment-generators,%{_systemd_user_env_generator_dir}, s,^/usr/lib/systemd/user-environment-generators,%{_systemd_user_env_generator_dir},
# perl
s,^/usr/lib/perl[5-9]/site_perl/[0-9.]*/.*-linux-thread-multi,%{perl_sitearch},
s,^/usr/lib/perl[5-9]/site_perl/[0-9.]*,%{perl_sitelib},
s,^/usr/lib/perl[5-9]/vendor_perl/[0-9.]*/.*-linux-thread-multi,%{perl_vendorarch},
s,^/usr/lib/perl[5-9]/vendor_perl/[0-9.]*,%{perl_vendorlib},
# pam # pam
s,^/etc/security,%{_pam_secconfdir}, s,^/etc/security,%{_pam_secconfdir},
s,^/etc/pam.d,%{_pam_confdir}, s,^/etc/pam.d,%{_pam_confdir},
@ -36,6 +51,7 @@ s,^/usr/share/pam.d,%{_pam_vendordir},
# generic translations # generic translations
s,^/usr/bin,%{_bindir}, s,^/usr/bin,%{_bindir},
s,^/usr/sbin,%{_sbindir}, s,^/usr/sbin,%{_sbindir},
s,^/usr/share/doc/,%{_docdir}/,
s,^/usr/share/info,%{_infodir}, s,^/usr/share/info,%{_infodir},
s,^/usr/share/man,%{_mandir}, s,^/usr/share/man,%{_mandir},
s,^/usr/share,%{_datadir}, s,^/usr/share,%{_datadir},
@ -52,6 +68,15 @@ format_unpackaged_file_list_i586="\
s,^/usr/lib/cmake/KF5,%{_kde5_libdir}/cmake/KF5, s,^/usr/lib/cmake/KF5,%{_kde5_libdir}/cmake/KF5,
s,^/usr/lib/libKF5,%{_kde5_libdir}/libKF5, s,^/usr/lib/libKF5,%{_kde5_libdir}/libKF5,
s,^/usr/lib/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K, s,^/usr/lib/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K,
# kde6
s,^/usr/lib/qt6/plugins/kf6,%{_kf6_plugindir},
# qt5
s,^/usr/lib/qt5/plugins,%{_qt5_plugindir},
s,^/usr/lib/qt5,%{_qt5_prefix},
# qt6
s,^/usr/lib/qt6/plugins,%{_qt6_plugindir},
s,^/usr/lib/qt6/qml,%{_qt6_qmldir},
s,^/usr/lib/qt6,%{_qt6_archdatadir},
# python # python
s,^/usr/lib/python2.7/site-packages,%{python27_sitearch}, s,^/usr/lib/python2.7/site-packages,%{python27_sitearch},
s,^/usr/lib/python3.11/site-packages,%{python3_sitearch}, s,^/usr/lib/python3.11/site-packages,%{python3_sitearch},
@ -75,6 +100,15 @@ format_unpackaged_file_list_x86_64="\
s,^/usr/lib64/cmake/KF5,%{_kde5_libdir}/cmake/KF5, s,^/usr/lib64/cmake/KF5,%{_kde5_libdir}/cmake/KF5,
s,^/usr/lib64/libKF5,%{_kde5_libdir}/libKF5, s,^/usr/lib64/libKF5,%{_kde5_libdir}/libKF5,
s,^/usr/lib64/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K, s,^/usr/lib64/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K,
# kde6
s,^/usr/lib64/qt6/plugins/kf6,%{_kf6_plugindir},
# qt5
s,^/usr/lib64/qt5/plugins,%{_qt5_plugindir},
s,^/usr/lib64/qt5,%{_qt5_prefix},
# qt6
s,^/usr/lib64/qt6/plugins,%{_qt6_plugindir},
s,^/usr/lib64/qt6/qml,%{_qt6_qmldir},
s,^/usr/lib64/qt6,%{_qt6_archdatadir},
# python # python
s,^/usr/lib64/python2.7/site-packages,%{python27_sitearch}, s,^/usr/lib64/python2.7/site-packages,%{python27_sitearch},
s,^/usr/lib/python2.7/site-packages,%{python27_sitelib}, s,^/usr/lib/python2.7/site-packages,%{python27_sitelib},

View File

@ -980,6 +980,9 @@ function git.create_tarball() {
if [ "${git_branch/@*}" != "${git_branch}" ]; then if [ "${git_branch/@*}" != "${git_branch}" ]; then
git_commit="${git_branch/*@}" git_commit="${git_branch/*@}"
git_branch="${git_branch/@*}" git_branch="${git_branch/@*}"
if [ ! "${git_commit}" ]; then
notify.error "$FUNCNAME: cannot checkout empty commit"
fi
fi fi
notify.debug "$FUNCNAME: git_branch = \"$git_branch\"" notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
if [ "${git_commit}" ]; then if [ "${git_commit}" ]; then
@ -1053,7 +1056,11 @@ not the expected package version"" (${NOTE}${today}git${NORM})..."
if [ "${git_commit}" ]; then if [ "${git_commit}" ]; then
cd ${pck_tarball} cd ${pck_tarball}
git checkout ${git_commit} git checkout ${git_commit} || {
popd &>/dev/null
rm -fr $tmpgitdir
notify.error $"cannot checkout the specified tag";
}
cd .. cd ..
fi fi

View File

@ -65,8 +65,8 @@ locales: merge-pot-files
$(srcdir)/po/$(pck_catalog_tmpl) && \ $(srcdir)/po/$(pck_catalog_tmpl) && \
echo "[DONE]" || { echo "[FAILED]"; exit 1; } echo "[DONE]" || { echo "[FAILED]"; exit 1; }
@echo -n "Checking $(pck_catalog) for untranslated strings... " @echo -n "Checking $(pck_catalog) for untranslated strings... "
@/bin/grep -q 'msgstr[ \t]*\"\"' $(pck_catalog) && \ @/bin/grep -q 'msgstr[ \t]*""' $(pck_catalog) && \
{ echo "[UNTRASLATED STRING]"; exit 1; } || \ { echo "[UNTRANSLATED STRING]"; exit 1; } || \
echo "[NONE]" echo "[NONE]"
install: $(pck_catalog:.po=.mo) install: $(pck_catalog:.po=.mo)

View File

@ -1,21 +1,3 @@
# Italian translation.
# Copyright (C) 2004-2013 Davide Madrisan
# This file is distributed under the same license as the autospec package.
# Davide Madrisan <davide.madrisan@gmail.com>, 2004-2013.
#
msgid ""
msgstr "Project-Id-Version: autospec 1.16.4\n"
"Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n"
"POT-Creation-Date: 2013-07-13 19:30+0100\n"
"PO-Revision-Date: 2013-07-13 19:30+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: \n"
"Language: Italian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "this script requires bash version 2 or better" msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore" msgstr "questo script richiede bash versione 2 o superiore"
@ -203,8 +185,8 @@ msgid "a new version of \\`${NOTE}$specname${NORM}' is available!"
msgstr "è disponibile una nuova versione di \\`${NOTE}$specname${NORM}'!" msgstr "è disponibile una nuova versione di \\`${NOTE}$specname${NORM}'!"
msgid "a newer version of \\`${NOTE}$specname${NORM}' is already installed" msgid "a newer version of \\`${NOTE}$specname${NORM}' is already installed"
msgstr "è già installata una versione successiva di \\`${NOTE}$specname" msgstr "è già installata una versione successiva di "
"${NORM}'" "\\`${NOTE}$specname${NORM}'"
msgid "cannot find a new version of \\`$specname'" msgid "cannot find a new version of \\`$specname'"
msgstr "impossibile trovare una nuova versione per \\`$specname'" msgstr "impossibile trovare una nuova versione per \\`$specname'"
@ -237,12 +219,12 @@ msgstr "tema di colori sconosciuto \\`$color_scheme': output con colori "
msgid "utility not found" msgid "utility not found"
msgstr "programma non trovato" msgstr "programma non trovato"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "usage error (--ftp/--html)" msgid "usage error (--ftp/--html)"
msgstr "errato utilizzo (--ftp/--html)" msgstr "errato utilizzo (--ftp/--html)"
msgid "missing mandatory arg"
msgstr "parametro mancante"
msgid "'\\\\' characters detected in \\$pck_name" msgid "'\\\\' characters detected in \\$pck_name"
msgstr "trovato carattere '\\\\' in \\$pck_name" msgstr "trovato carattere '\\\\' in \\$pck_name"
@ -297,6 +279,9 @@ msgstr "clonazione del repository"
msgid "cannot clone git repository" msgid "cannot clone git repository"
msgstr "impossibile clonare il repository git" msgstr "impossibile clonare il repository git"
msgid "cannot checkout the specified tag"
msgstr "impossibile fare il checkout del tag specificato"
msgid "creating the compressed source tarball" msgid "creating the compressed source tarball"
msgstr "creazione del file sorgente compresso" msgstr "creazione del file sorgente compresso"
@ -518,7 +503,8 @@ msgid "Override packager email"
msgstr "Ridefinisce l'indirizzo mail del packager" msgstr "Ridefinisce l'indirizzo mail del packager"
msgid "Override release append tag (predefined: $DISTRO_rpm)" msgid "Override release append tag (predefined: $DISTRO_rpm)"
msgstr "Ridefinisce l'etichetta aggiunta alla release (predefinito: $DISTRO_rpm)" msgstr "Ridefinisce l'etichetta aggiunta alla release (predefinito: "
"$DISTRO_rpm)"
msgid "action" msgid "action"
msgstr "azione" msgstr "azione"
@ -586,8 +572,8 @@ msgstr "specfile in formato non supportato"
msgid "release number: unsupported format" msgid "release number: unsupported format"
msgstr "numero di release: formato non supportato" msgstr "numero di release: formato non supportato"
msgid "new release \\`$pck_newrel' must be greater than current one \\`" msgid "new release \\`$pck_newrel' must be greater than current one "
"$SPEC_RELEASE'" "\\`$SPEC_RELEASE'"
msgstr "la nuova release \\`$pck_newrel' deve essere maggiore di quella " msgstr "la nuova release \\`$pck_newrel' deve essere maggiore di quella "
"corrente \\`$SPEC_RELEASE'" "corrente \\`$SPEC_RELEASE'"
@ -724,8 +710,8 @@ msgid "cannot install the needed build requirements"
msgstr "impossibile installare i \"build requirement\" necessari" msgstr "impossibile installare i \"build requirement\" necessari"
msgid "found ${NOTE}missing BuildRequirement${NORM} \\`${NOTE}$f${NORM}'" msgid "found ${NOTE}missing BuildRequirement${NORM} \\`${NOTE}$f${NORM}'"
msgstr "trovato ${NOTE}BuildRequirement non soddisfatto${NORM} \\`${NOTE}$f" msgstr "trovato ${NOTE}BuildRequirement non soddisfatto${NORM} "
"${NORM}'" "\\`${NOTE}$f${NORM}'"
msgid "testing out specfile" msgid "testing out specfile"
msgstr "esecuzione dei test sullo specfile" msgstr "esecuzione dei test sullo specfile"
@ -744,7 +730,8 @@ msgstr "Sembra ok ma non dimenticare di eseguire i test di qualità e "
"sicurezza" "sicurezza"
msgid "no arch-specific pattern translations for unpackaged files" msgid "no arch-specific pattern translations for unpackaged files"
msgstr "nessuna corrispondenza di pattern legati all'architettura per i file non pacchetizzati" msgstr "nessuna corrispondenza di pattern legati all'architettura per i file "
"non pacchetizzati"
msgid "Add the following files in the right %files blocks" msgid "Add the following files in the right %files blocks"
msgstr "Smistare i seguenti file nelle sezioni %files corrispondenti" msgstr "Smistare i seguenti file nelle sezioni %files corrispondenti"
@ -767,9 +754,6 @@ msgid "\n"
msgstr "\n" msgstr "\n"
"Sostituzione del blocco AUTOBUILDREQ e ricreazione del pacchetto SRPM" "Sostituzione del blocco AUTOBUILDREQ e ricreazione del pacchetto SRPM"
msgid "replacing the AUTOBUILDREQ block by:"
msgstr "sostituzione del blocco AUTOBUILDREQ con:"
msgid "rpm exited with error code:" msgid "rpm exited with error code:"
msgstr "rpm è terminato con il codice di errore:" msgstr "rpm è terminato con il codice di errore:"
@ -779,9 +763,6 @@ msgstr "controllo dello specfile alla ricerca di comuni errori"
msgid "checking packages for common mistakes" msgid "checking packages for common mistakes"
msgstr "controllo dei pacchetti alla ricerca di comuni errori" msgstr "controllo dei pacchetti alla ricerca di comuni errori"
msgid "server unreachable"
msgstr "server non raggiungibile"
msgid "you have no read write access to url#$ftp_server_upload_num" msgid "you have no read write access to url#$ftp_server_upload_num"
msgstr "accesso in scrittura alla url#$ftp_server_upload_num vietato" msgstr "accesso in scrittura alla url#$ftp_server_upload_num vietato"
@ -871,8 +852,10 @@ msgstr "specfile per applicazioni web"
msgid "Redirect the output to the file <outfile>" msgid "Redirect the output to the file <outfile>"
msgstr "Redirige lo standard output sul file <outfile>" msgstr "Redirige lo standard output sul file <outfile>"
msgid "Specify a git branch or tag and (optionally) a commit by appending @commit_id" msgid "Specify a git branch or tag and (optionally) a commit by appending "
msgstr "Specifica un branch o un tag git e (opzionalmente) un commit aggiungendo @commit_id" "@commit_id"
msgstr "Specifica un branch o un tag git e (opzionalmente) un commit "
"aggiungendo @commit_id"
msgid "Do not remove git files" msgid "Do not remove git files"
msgstr "Non rimuove i file git" msgstr "Non rimuove i file git"
@ -904,9 +887,6 @@ msgstr "impossibile trovare il pacchetto $pck_tarball"
msgid "cannot get the package name, use the \\`-n' option" msgid "cannot get the package name, use the \\`-n' option"
msgstr "impossibile ricavare il nome del pacchetto, usa l'opzione \\`-n'" msgstr "impossibile ricavare il nome del pacchetto, usa l'opzione \\`-n'"
msgid "invalid version number"
msgstr "numero di versione non valido"
msgid "cannot get the package version, use the \\`-v' option" msgid "cannot get the package version, use the \\`-v' option"
msgstr "impossibile ricavare la versione del pacchetto, usa l'opzione \\`-v'" msgstr "impossibile ricavare la versione del pacchetto, usa l'opzione \\`-v'"
@ -976,6 +956,22 @@ msgstr "manca almeno una direttiva \\`%defattr'"
msgid "use rpm macros if possible:" msgid "use rpm macros if possible:"
msgstr "utilizzare le macro rpm quando possibile:" msgstr "utilizzare le macro rpm quando possibile:"
# Italian translation.
# Copyright (C) 2004-2013 Davide Madrisan
# This file is distributed under the same license as the autospec package.
# Davide Madrisan <davide.madrisan@gmail.com>, 2004-2013.
#
msgid ""
msgstr "Project-Id-Version: autospec 1.16.4\n"
"Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n"
"POT-Creation-Date: 2013-07-13 19:30+0100\n"
"PO-Revision-Date: 2013-07-13 19:30+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: \n"
"Language: Italian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "localization files must be packaged via \\`%find_lang'" msgid "localization files must be packaged via \\`%find_lang'"
msgstr "trovati file di localizzazione non gestiti da \\`%find_lang'" msgstr "trovati file di localizzazione non gestiti da \\`%find_lang'"
@ -1103,3 +1099,12 @@ msgid "${NOTE}Security checks: ${#rpmpkg_name[@]} package(s) checked: "
"${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}" "${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}"
msgstr "${NOTE}Controlli di sicurezza: pacchetti rpm: ${#rpmpkg_name[@]}; " msgstr "${NOTE}Controlli di sicurezza: pacchetti rpm: ${#rpmpkg_name[@]}; "
"problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}" "problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}"
#~ msgid "replacing the AUTOBUILDREQ block by:"
#~ msgstr "sostituzione del blocco AUTOBUILDREQ con:"
#~ msgid "server unreachable"
#~ msgstr "server non raggiungibile"
#~ msgid "invalid version number"
#~ msgstr "numero di versione non valido"

View File

@ -1,5 +1,5 @@
%define ghc_ver %(ghc --numeric-version) %define ghc_ver %(ghc --numeric-version)
%define pkgname %(echo %name | sed "s|^ghc-||") %define pkg_name %(echo %name | sed "s|^ghc-||")
Name: @pck_name@ Name: @pck_name@
Version: @pck_version@ Version: @pck_version@
@ -9,8 +9,8 @@ Group: Development/Libraries
Vendor: @VENDOR@ Vendor: @VENDOR@
Distribution: @DISTRO@ Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@> Packager: @packager_fullname@ <@packager_email@>
URL: http://hackage.haskell.org/package/%{pkgname} URL: https://hackage.haskell.org/package/%{pkg_name}
Source: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz Source: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
License: BSD License: BSD
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
@ -22,59 +22,60 @@ Requires(post): %{__install_info}
Requires(preun): %{__install_info} Requires(preun): %{__install_info}
@fi:infopages @fi:infopages
BuildRequires: ghc BuildRequires: ghc
BuildRequires: hscolour BuildRequires: ghc-rpm-macros
Requires: ghc = %{ghc_ver} Requires: ghc = %{ghc_ver}
%description %description
... %{summary}.
## Remove the following block if there is no binary tool provided %package devel
#%package -n %{pkgname} Summary: Haskell %{pkg_name} library development files
#Group: Applications/Development Provides: %{name}-static = %{?epoch:%epoch:}%{version}-%{release}
#Summary: ... Provides: %{name}-static%{?_isa} = %{?epoch:%epoch:}%{version}-%{release}
# %if %{defined ghc_version}
#%description -n %{pkgname} Requires: ghc = %{ghc_version}
#... %endif
Requires: %{name}%{?_isa} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
This package provides the Haskell %{pkg_name} library development files.
%if %{with haddock}
%package doc
Summary: Haskell %{pkg_name} library documentation
Requires: ghc-filesystem
%description doc
This package provides the Haskell %{pkg_name} library documentation.
%endif
%prep %prep
%setup -q -n %{pkgname}-%{version} %setup -q -n %{pkgname}-%{version}
%build %build
runghc Setup.hs configure -v2 \\ %ghc_lib_build
\ --prefix=%{_prefix} \\
\ --libdir=%{_libdir} \\
\ --libexecdir=%{_libexecdir} \\
\ --docdir=%{_docdir}/%{name}-%{version}
runghc Setup.hs build
runghc Setup.hs haddock --executable --html-location=URL --hyperlink-source
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %ghc_lib_install
runghc Setup.hs copy --destdir=%{buildroot}
runghc Setup.hs register \\ rm -f %{buildroot}%{_ghclicensedir}/%{name}/LICENSE
\ --gen-pkg-config="%{buildroot}%{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf"
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post %files -f %{name}.files
ghc-pkg register %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf &>/dev/null || :
%preun
ghc-pkg unregister %{pkgname}-%{version} &>/dev/null || :
%files
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version} %license LICENSE
%dir %{_docdir}/%{name}-%{version}
%{_docdir}/%{name}-%{version}/LICENSE
%{_docdir}/%{name}-%{version}/html
## Remove the following block if there is no binary tool provided %files devel -f %{name}-devel.files
#%files -n %{pkgname} %defattr(-,root,root)
#%defattr(-,root,root) #%doc CHANGELOG.markdown README.markdown
#%{_bindir}/%{pkgname}
%if %{with haddock}
%files doc -f %{name}-doc.files
%defattr(-,root,root)
%license LICENSE
%endif
%changelog %changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@ * @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@

111
templates/kf6 Normal file
View File

@ -0,0 +1,111 @@
%define framework %(echo %name | sed "s|^kf6-||")
%define majver %(echo %version | cut -d. -f1-2)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: https://kde.org
Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRequires: kf6-rpm-macros
BuildRequires: extra-cmake-modules
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
...
## remove the library block if this package does not provide library and development stuff
%package -n lib%{name}
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n lib%{name}
This package contains shared libraries for %{name}.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}-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_kf6
%cmake_build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%cmake_install
@if:i18n
%find_lang %{name} --with-qt --with-man --with-html --all-name || touch %{name}.lang
@fi:i18n
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n lib%{name}
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
exit 0
%postun -n lib%{name}
@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}.lang
@else:i18n
%files
@fi:i18n
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde6_bindir}/%{name}
# %{_kde6_datadir}/%{name}
## 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 library and development stuff
%files -n lib%{name}
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde6_libdir}/*.so
%files -n lib%{name}-devel
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde6_includedir}/<KF5Framework>
# %{_kde6_includedir}/%{name}_version.h
# %{_kde6_libdir}/cmake/<KF5Framework>
# %{_kde6_libdir}/*.so
# %{_kde6_mkspecsdir}/qt_*.pri
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@