1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
Summary: Sony Vaio SPIC Control Program
Name: spicctrl
Version: 1.9
Release: 1
Copyright: GPL
Group: Applications/System
BuildRoot: %{_builddir}/%{name}-root
Source: http://popies.net/sonypi/spicctrl-%{version}.tar.bz2
URL: http://popies.net/sonypi/
Vendor: Stelian Pop <stelian@popies.net>
%description
This utility allows one to query and set a variety of parameters on your
Sony Vaio laptop computer, including:
* AC Power status
* Battery status
* Screen brightness
* Bluetooth device power status
%prep
%setup -n %{name}-%{version}
bzip2 -dc %{_sourcedir}/%{name}-%{version}.tar.bz2 | tar xvf -
%build
make
%clean
rm -rf $RPM_BUILD_ROOT
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
install %{_builddir}/%{name}-%{version}/spicctrl $RPM_BUILD_ROOT/usr/sbin
install %{_builddir}/%{name}-%{version}/spicctrl.1 $RPM_BUILD_ROOT/%{_mandir}/man1
%post
if [ ! -c /dev/sonypi ]; then
rm -f /dev/sonypi
mknod /dev/sonypi c 10 250
fi
if [ -e /etc/modules.conf ]; then
grep 'alias char-major-10-250 sonypi' /etc/modules.conf > /dev/null
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
echo 'alias char-major-10-250 sonypi' >> /etc/modules.conf
echo 'options sonypi minor=250' >> /etc/modules.conf
fi
fi
if [ -e /etc/modprobe.conf ]; then
grep 'alias char-major-10-250 sonypi' /etc/modprobe.conf > /dev/null
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
echo 'alias char-major-10-250 sonypi' >> /etc/modprobe.conf
echo 'options sonypi minor=250' >> /etc/modprobe.conf
fi
fi
%files
%attr(0755,root,root) /usr/sbin/spicctrl
%{_mandir}/man1/spicctrl.1*
%doc %attr(0644,root,root) AUTHORS
%doc %attr(0444,root,root) LICENSE
%doc %attr(0444,root,root) CHANGES
|