Release: 0.1
License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
Group: Applications
+# SF URL: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+# github URL https://github.com/USER/PROJECT/archive/v%{version}/%{plugin}-%{version}.tar.gz
Source0: %{name}-%{version}.tar.gz
# Source0-md5: -
#Source1: -
Requires(post,preun): /sbin/chkconfig
Requires: rc-scripts
%endif
+%if %{with systemd_service}
+BuildRequires: rpmbuild(macros) >= 1.647
+Requires(post,preun,postun): systemd-units >= 38
+Requires: systemd-units >= 0.38
+%endif
#BuildRequires: -
#BuildRequires: autoconf
#BuildRequires: automake
Summary: -
Summary(pl.UTF-8): -
Group: -
+# noarch subpackages only when building with rpm5
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description subpackage
%endif
%if %{with initscript}
-%post init
+%post
/sbin/chkconfig --add %{name}
%service %{name} restart
-%preun init
+%preun
if [ "$1" = "0" ]; then
%service -q %{name} stop
/sbin/chkconfig --del %{name}
fi
%endif
+%if %{with systemd_service}
+%post
+%systemd_post %{name}.service
+
+%preun
+%systemd_preun %{name}.service
+
+%postun
+%systemd_reload
+%endif
+
%files
%defattr(644,root,root,755)
%doc AUTHORS CREDITS CHANGES ChangeLog NEWS README THANKS TODO
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
%endif
+%if %{with systemd_service}
+%{systemdunitdir}/%{name}.service
+%endif
+
#%{_examplesdir}/%{name}-%{version}
%if %{with subpackage}