Changed files:
apcupsd.spec -> 1.10
Version: 3.5.8
Release: 2
License: GPL v2
Version: 3.5.8
Release: 2
License: GPL v2
-Group: System Environment/Daemons
-Source: http://www.brisse.dk/site/apcupsd/download/%{name}-%{version}.src.tar.gz
+Group: Networking/Daemons
+Group(pl): Sieciowe/Serwery
+Source0: http://www.brisse.dk/site/apcupsd/download/%{name}-%{version}.src.tar.gz
Patch0: apcups-initscript.patch
Patch1: apcups-makefile.patch
Patch2: apcupsd-Makefile-fix.patch
Patch0: apcups-initscript.patch
Patch1: apcups-makefile.patch
Patch2: apcupsd-Makefile-fix.patch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
#Icon: apcupsd-logo.xpm
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
#Icon: apcupsd-logo.xpm
-%define _prefix /
-%define _mandir /usr/share/man
+%define _prefix /
+%define _mandir /usr/share/man
%description
UPS power management under Linux for APCC Products. It allows your
%description
UPS power management under Linux for APCC Products. It allows your
-computer/server to run during power problems for a specified length of time
-or the life of the batteries in your BackUPS, BackUPS Pro, SmartUPS v/s, or
-SmartUPS, and then properly executes a controlled shutdown during an
-extended power failure.
+computer/server to run during power problems for a specified length of
+time or the life of the batteries in your BackUPS, BackUPS Pro,
+SmartUPS v/s, or SmartUPS, and then properly executes a controlled
+shutdown during an extended power failure.
%prep
%setup -q -n %{name}-%{version}.src
%prep
%setup -q -n %{name}-%{version}.src
-rm -rf ${RPM_BUILD_ROOT}
# Some issues :
# - why doesn't the Makefile know that it should install *-linux ??
# Some issues :
# - why doesn't the Makefile know that it should install *-linux ??
install -d ${RPM_BUILD_ROOT}/{bin,sbin,usr/share/man/man8}
install -d ${RPM_BUILD_ROOT}/{etc/rc.d/init.d,var/log}
install -d ${RPM_BUILD_ROOT}/{bin,sbin,usr/share/man/man8}
install -d ${RPM_BUILD_ROOT}/{etc/rc.d/init.d,var/log}
-NAME="-linux" make MANPREFIX="${RPM_BUILD_ROOT}/usr/share/" install
+NAME="-linux" make MANPREFIX="${RPM_BUILD_ROOT}%{_datadir}/" install
# hany: why this? we're just building. not installing
#[ -x /sbin/powersc ] && /sbin/powersc RESTARTME
# hany: why this? we're just building. not installing
#[ -x /sbin/powersc ] && /sbin/powersc RESTARTME
-gzip -9nf ${RPM_BUILD_ROOT}/usr/share/man/man8/*
-install installs/apcupsd.conf ${RPM_BUILD_ROOT}/etc
+gzip -9nf ${RPM_BUILD_ROOT}%{_mandir}/man8/*
+install installs/apcupsd.conf ${RPM_BUILD_ROOT}%{_sysconfdir}
install installs/apcups.rhs ${RPM_BUILD_ROOT}/etc/rc.d/init.d/apcups
touch ${RPM_BUILD_ROOT}/var/log/apcupsd.log
install installs/apcups.rhs ${RPM_BUILD_ROOT}/etc/rc.d/init.d/apcups
touch ${RPM_BUILD_ROOT}/var/log/apcupsd.log
-touch ${RPM_BUILD_ROOT}/etc/apcupsd.status
+touch ${RPM_BUILD_ROOT}%{_sysconfdir}/apcupsd.status
%clean
rm -rf ${RPM_BUILD_ROOT}
%clean
rm -rf ${RPM_BUILD_ROOT}
%defattr(644,root,root,755)
%doc README.NEW Changelog port.gif Statement.APCC
%doc %{name}-%{version}.src.lsm
%defattr(644,root,root,755)
%doc README.NEW Changelog port.gif Statement.APCC
%doc %{name}-%{version}.src.lsm
-%doc readmes/*
-%doc docs/apcupsd.docs
+%doc readmes/* docs/apcupsd.docs
%doc installs/halt.rhs installs/apcups.rhs installs/powersc
%doc installs/halt.rhs installs/apcups.rhs installs/powersc
-%attr(644,root,root) /usr/share/man/man8/apcupsd.8.gz
-%attr(755, root, bin) /sbin/apcupsd
-%attr(755, root, root) /bin/apcaccess
-%attr(755, root, bin) %config /sbin/powersc
-%attr(640, root, root) %config(noreplace) /etc/apcupsd.conf
-%attr(754, root, root) /etc/rc.d/init.d/apcups
+%{_mandir}/man8/apcupsd.8*
+%attr(755,root,root) /sbin/apcupsd
+%attr(755,root,root) /bin/apcaccess
+%attr(755,root,root) %config /sbin/powersc
+%attr(640,root,root) %config(noreplace) %{_sysconfdir}/apcupsd.conf
+%attr(754,root,root) /etc/rc.d/init.d/apcups
%ghost /var/log/apcupsd.log
%ghost /var/log/apcupsd.log
-%ghost /etc/apcupsd.status
+%ghost %{_sysconfdir}/apcupsd.status