From 20748b3fe6e59c6072e151517f12ff0b96146b59 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Sat, 6 Oct 2012 18:46:50 +0200 Subject: [PATCH] autospec.spec: make the specfile more distro-agnostic Signed-off-by: Davide Madrisan --- ChangeLog | 11 +++++++++++ autospec.spec.in | 35 ++++++++++++++++++----------------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16900d0..d08dc39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Changes in version 1.12.6 + ++ update + * autospec.spec - Davide Madrisan: + Update the URL tag. + + * autospec.spec - Davide Madrisan: + Make the specfile more distro-agnostic. + +------------------------------------------------------------------------------- + Changes in version 1.12.5 Wed Oct 03 2012 Davide Madrisan diff --git a/autospec.spec.in b/autospec.spec.in index 7d5a8c7..67b2cfc 100644 --- a/autospec.spec.in +++ b/autospec.spec.in @@ -1,6 +1,7 @@ -# please customize this directive (or use root if your distro does not have -# such a group) -%define packager_group packager +# modify these definitions according to your distribution +%define distribution openmamba +%define vendor openmamba +%define rpmbuild_group packager Name: autospec Version: @version@ @@ -8,8 +9,8 @@ Release: @release@ Summary: Create specfiles and automatically update/check/fix rpm packages Summary(it): Crea specfile ed aggiorna/controlla/corregge in modo automatico pacchetti rpm Group: Development/Tools -Vendor: openmamba -Distribution: openmamba +Vendor: %{vendor} +Distribution: %{distribution} Packager: Davide Madrisan URL: https://sites.google.com/site/davidemadrisan/opensource#TOC-autospec-suite # http://git.openmamba.org/?p=autospec.git;a=summary @@ -58,16 +59,16 @@ This package contains the plugins needed for generating specfiles, updating rpm %description -l it plugins Questo pacchetto contiene i plugin necessari per generare specfile, aggiornare pacchetti rpm, estrarre file da pacchetti source rpm (srpm). -%package config-openmamba +%package config-%{distribution} Summary: Configuration files for autospec Summary(it): File di configurazione per autospec Group: Development/Tools Provides: %{name}-config = %{?epoch:%epoch:}%{version}-%{release} -%description config-openmamba +%description config-%{distribution} This package contains the configuration files for autospec. -%description -l it config-openmamba +%description -l it config-%{distribution} Questo pacchetto contiene i file di configurazione di autospec. %package libs @@ -83,16 +84,16 @@ They can be used by external tools that manage rpm packages and specfiles. Questo pacchetto contiene le librerie necessarie al funzionamento di autospec e dei suoi plugin. Possono anche essere stilizzate da tool esterni che lavorano su rpm e specfile. -%package templates-openmamba +%package templates-%{distribution} Summary: Autospec templates Summary(it): Template per autospec Group: Development/Tools Provides: %{name}-templates = %{?epoch:%epoch:}%{version}-%{release} -%description templates-openmamba +%description templates-%{distribution} This package contains the templates used by autospec for generating specfiles from tarballs. -%description -l it templates-openmamba +%description -l it templates-%{distribution} Questo pacchetto contiene i template utilizzati da autospec per generare gli specfile a partire dai sorgenti. %package tests @@ -149,19 +150,19 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix} %lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/pck-extract.mo %lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/pck-update.mo %lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/spec-create.mo -%if %{packager_group} == "root" +%if %{rpmbuild_group} == "root" %config %attr(644,root,root) %{_sysconfdir}/%{name}.conf %else -%config %attr(640,root,%{packager_group}) %{_sysconfdir}/%{name}.conf +%config %attr(640,root,%{rpmbuild_group}) %{_sysconfdir}/%{name}.conf %endif -%files config-openmamba +%files config-%{distribution} %defattr(-,root,root) %dir %{_sysconfdir}/%{name}.d -%if %{packager_group} == "root" +%if %{rpmbuild_group} == "root" %config %attr(644,root,root) %{_sysconfdir}/%{name}.d/*.conf %else -%config %attr(640,root,%{packager_group}) %{_sysconfdir}/%{name}.d/*.conf +%config %attr(640,root,%{rpmbuild_group}) %{_sysconfdir}/%{name}.d/*.conf %endif %files libs @@ -169,7 +170,7 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix} %{_datadir}/%{name}/lib/* %lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/lib*.mo -%files templates-openmamba +%files templates-%{distribution} %defattr(-,root,root) %{_datadir}/%{name}/templates