apmd/apmd.spec

132 lines
3.9 KiB
RPMSpec

Name: apmd
Version: 3.2.2
Release: 5mamba
Summary: Advanced Power Management (APM) BIOS utilities for laptops.
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.worldvisions.ca/~apenwarr/apmd/
Source: http://http.us.debian.org/debian/pool/main/a/apmd/apmd_%{version}.orig.tar.gz
Source1: apmd-initscript
Patch1: %{name}-kernel-2.4.patch.bz2
Patch2: %{name}-glibc-2.2.5.patch.bz2
Patch3: %{name}-3.2.0.x11includes.patch
Patch4: %{name}-3.2.2-libtool_tag.patch
License: GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
APMD is a set of programs for controlling the Advanced Power Management daemon and utilities found in most modern laptop computers.
APMD can watch your notebook's battery and warn users when the battery is low.
APMD is also capable of shutting down the PCMCIA sockets before a suspend.
Install the apmd package if you need to control the APM system on your laptop.
%package -n libapm
Summary: Advanced Power Management (APM) library
Group: System/Libraries
%description -n libapm
APMD is a set of programs for controlling the Advanced Power Management daemon and utilities found in most modern laptop computers.
APMD can watch your notebook's battery and warn users when the battery is low.
APMD is also capable of shutting down the PCMCIA sockets before a suspend.
Install the apmd package if you need to control the APM system on your laptop.
This package contains the libraries.
%package -n libapm-devel
Summary: Development package for apdm
Group: Development/Libraries
Requires: libapm = %{version}-%{release}
%description -n libapm-devel
APMD is a set of programs for controlling the Advanced Power Management daemon and utilities found in most modern laptop computers.
APMD can watch your notebook's battery and warn users when the battery is low.
APMD is also capable of shutting down the PCMCIA sockets before a suspend.
Install the apmd package if you need to control the APM system on your laptop.
This is the development package.
%prep
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%setup -q -n apmd-%{version}.orig
#%patch1 -p1
#%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
make prefix=%{_prefix}
%install
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_initrddir}
cp %{SOURCE1} %{buildroot}%{_initrddir}/apmd
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ $1 -eq 1 ]; then
# new install
chkconfig --add apmd
fi
exit 0
%preun
if [ $1 -eq 0 ]; then
# erase
chkconfig --del apmd
%{_initrddir}/apmd stop
fi
exit 0
%postun
if [ $1 -eq 1 ]; then
# update
%{_initrddir}/apmd restart
fi
exit 0
%files
%defattr(-,root,root)
%{_bindir}/apm
%{_bindir}/apmsleep
%{_bindir}/on_ac_power
%{_bindir}/xapm
%{_sbindir}/apmd
%attr(755,root,root) %{_initrddir}/apmd
%files -n libapm
%defattr(-,root,root)
%{_libdir}/libapm.so.*
%files -n libapm-devel
%defattr(-,root,root)
%{_libdir}/libapm.a
%{_libdir}/libapm.la
%{_libdir}/libapm.so
%{_includedir}/apm.h
%changelog
* Thu Jul 11 2013 Automatic Build System <autodist@mambasoft.it> 3.2.2-5mamba
- automatic rebuild by autodist
* Sat May 09 2009 Automatic Build System <autodist@mambasoft.it> 3.2.2-4mamba
- automatic rebuild by autodist
* Mon May 21 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.2-3mamba
- added patch for recent libtool support
- added subpackages libapm and libapm-devel, removed apm-devel
- group and specfile fixes
* Mon Nov 29 2004 Silvan Calarco <silvan.calarco@qinet.it> 3.2.2-2qilnx
- don't start service on new install
* Thu Nov 11 2004 Silvan Calarco <silvan.calarco@qinet.it> 3.2.2-1qilnx
- new version build
- start service if acpi is not present and apm is
* Thu Jul 17 2003 Silvan Calarco <silvan.calarco@qinet.it> 3.2.0-1qilnx
- first build for apmd