2011-04-26 21:39:44 +02:00
|
|
|
Name: @pck_name@
|
|
|
|
Version: @pck_version@
|
|
|
|
Release: @spec_first_release@@DISTRO_rpm@
|
|
|
|
Summary: ...
|
|
|
|
Group: ...
|
|
|
|
Vendor: @VENDOR@
|
|
|
|
Distribution: @DISTRO@
|
|
|
|
Packager: @packager_fullname@ <@packager_email@>
|
|
|
|
URL: ...
|
|
|
|
Source: ...
|
|
|
|
#Patch0: %{name}-<pck-version>-<patch-description>.patch
|
|
|
|
License: ...
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
|
|
|
|
## AUTOBUILDREQ-END
|
|
|
|
@if:infopages
|
|
|
|
Requires(post): %{__install_info}
|
|
|
|
@fi:infopages
|
|
|
|
BuildRoot: @rpm_default_buildroot@
|
|
|
|
|
2012-01-06 23:13:44 +01:00
|
|
|
@if:debug_package
|
|
|
|
%debug_package
|
|
|
|
@fi:debug_package
|
|
|
|
|
2011-04-26 21:39:44 +02:00
|
|
|
%description
|
|
|
|
...
|
|
|
|
|
|
|
|
@if:pck_apidocs
|
|
|
|
%package apidocs
|
|
|
|
Group: Documentation
|
|
|
|
Summary: %{name} API documentation
|
|
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
Requires: gtk-doc
|
|
|
|
|
|
|
|
%description apidocs
|
|
|
|
This package includes the %{name} API documentation.
|
|
|
|
@fi:pck_apidocs
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
#%patch0 -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
@if:pck_apidocs
|
|
|
|
@configure@ --enable-gtk-doc
|
|
|
|
@else:pck_apidocs
|
|
|
|
@configure@
|
|
|
|
@fi:pck_apidocs
|
|
|
|
@make@
|
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
@makeinstall@
|
|
|
|
|
|
|
|
@if:i18n
|
|
|
|
%find_lang %{name}
|
|
|
|
@fi:i18n
|
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%pre
|
|
|
|
/usr/sbin/useradd -s /bin/false -r -d <service_homedir> \\
|
2012-01-18 21:23:10 +01:00
|
|
|
\ -c "service description" <service_name> >/dev/null 2>&1 || :
|
2011-04-26 21:39:44 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
\ /sbin/chkconfig --add <daemon_name>
|
|
|
|
\ /sbin/service <daemon_name> start
|
|
|
|
fi
|
2011-12-16 22:55:11 +01:00
|
|
|
@if:infopages
|
|
|
|
## modify the infopage name as required
|
|
|
|
%install_info %{name}.info
|
|
|
|
@fi:infopages
|
2011-04-26 21:39:44 +02:00
|
|
|
exit 0
|
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ $1 -eq 0 ]; then
|
2012-01-18 21:23:10 +01:00
|
|
|
\ /sbin/service <daemon_name> stop >/dev/null 2>&1 || :
|
2011-04-26 21:39:44 +02:00
|
|
|
\ /sbin/chkconfig --del <daemon_name>
|
|
|
|
fi
|
2011-12-16 22:55:11 +01:00
|
|
|
@if:infopages
|
|
|
|
## modify the infopage name as required
|
|
|
|
%uninstall_info %{name}.info
|
|
|
|
@fi:infopages
|
2011-04-26 21:39:44 +02:00
|
|
|
exit 0
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 -ge 1 ]; then
|
2012-01-18 21:23:10 +01:00
|
|
|
\ /sbin/service <daemon_name> condrestart >/dev/null 2>&1 || :
|
2011-04-26 21:39:44 +02:00
|
|
|
fi
|
|
|
|
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
|
|
|
|
# %{_bindir}/%{name}
|
|
|
|
# %{_datadir}/%{name}
|
|
|
|
# %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
|
|
|
# %{_mandir}/man?/*
|
|
|
|
@if:infopages
|
|
|
|
# %{_infodir}/*.info.*
|
|
|
|
@fi:infopages
|
|
|
|
@standard_docs@
|
2011-12-16 22:00:51 +01:00
|
|
|
## note: eventually add the remaining documents (if any)
|
|
|
|
# @standard_docs_devel@
|
2011-04-26 21:39:44 +02:00
|
|
|
|
|
|
|
@if:pck_apidocs
|
|
|
|
%files apidocs
|
|
|
|
%defattr(-,root,root)
|
|
|
|
## note: this list is just an example; modify as required
|
|
|
|
# %{_datadir}/gtk-doc/html/%{name}
|
|
|
|
@fi:pck_apidocs
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
|
|
|
|
- @spec_changelog_comment@
|