Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 5d337978df9423453c02d233eca1bafb > files > 8

apmd-3.2.2-29.mga3.src.rpm

%define libname_orig	libapm
%define major		1
%define libname		%mklibname apm %{major}
%define develname	%mklibname apm -d

Summary:	Advanced Power Management (APM) BIOS utilities for laptops
Name:		apmd
Version:	3.2.2
Release:	%mkrel 29
Source:		ftp://ftp.debian.org/debian/pool/main/a/apmd/%{name}_%{version}.orig.tar.bz2
Source1:	apmd.init
Source3:	apmd_proxy
Patch0:		apmd-3.2.2.orig-lib64.patch
Patch1:		apmd-3.2.2.orig-graphicswitch.patch
Patch2:		apmd-3.2.2.orig-optimization.patch
Patch5:		apmd-3.2.2.orig-security.patch
Patch9:		apmd-3.2.2.orig-proxy-timeout.patch
Patch10:	apmd-3.2.2-libtool.patch
License:	GPLv2+
Group:		System/Servers
BuildRequires:	libx11-devel
BuildRequires:	libxaw-devel
BuildRequires:	libxt-devel
BuildRequires:	libtool
Requires:	initscripts
ExclusiveArch:	%{ix86} x86_64 ppc %mips %arm

%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 %{libname}
Summary:	Main library for %{libname_orig}
Group:		System/Libraries
Provides:	%{libname_orig} = %{version}-%{release}

%description -n %{libname}
This package contains the library needed to run programs dynamically
linked with %{libname_orig}.

%package -n %{develname}
Summary:	Development library for %{libname_orig}
Group:		Development/C
Requires:	%{libname} = %{version}
Provides:	%{libname_orig}-devel = %{version}-%{release}
Obsoletes:	%{name}-devel
Obsoletes:	%{mklibname apm 1 -d}
Provides:	%{name}-devel

%description -n %{develname}
This package contains the developmeent library needed to compile
programs that use %{libname_orig}.

%prep
%setup -q -n apmd-%{version}.orig
%apply_patches
echo "LIB = %_lib" > config.make

%build
%serverbuild
make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{ldflags} -s" PROXY_DIR=%{_sbindir}

%install
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/apm-scripts

%makeinstall_std PREFIX=%{_prefix} MANDIR=%{_mandir}

for i in apm.1 apmsleep.1;do install -m644 $i -D %{buildroot}/%{_mandir}/man1/$i;done
install -m644 apmd.8 -D %{buildroot}/%{_mandir}/man8/apmd.8

install -m755 %{SOURCE1} -D %{buildroot}%{_initrddir}/apmd
install -m755 %{SOURCE3} -D %{buildroot}%{_sbindir}/apmd_proxy
rm -f %{buildroot}%{_bindir}/on_ac_power

%post 
%_post_service apmd

%preun
%_preun_service apmd

%triggerpostun -- apmd <= 3.0final-6
/sbin/chkconfig --add apmd

%files
%doc AUTHORS ChangeLog README apmsleep.README
%{_mandir}/man?/*
%{_bindir}/*
%{_sbindir}/*
%config(noreplace) %{_initrddir}/apmd

%files -n %{libname}
%{_libdir}/*.so.*

%files -n %{develname}
%{_libdir}/*so
%{_libdir}/*a
%{_includedir}/*





%changelog

* Fri Jan 11 2013 umeabot <umeabot> 3.2.2-29.mga3
+ Revision: 345956
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed Jan 02 2013 pterjan <pterjan> 3.2.2-28.mga3
+ Revision: 337665
- Fix build

  + zezinho <zezinho>
    - spec cleanup

* Wed Mar 09 2011 ennael <ennael> 3.2.2-26.mga1
+ Revision: 66853
- clean spec file
- imported package apmd