]> git.pld-linux.org Git - SPECS.git/blob - spicctrl.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / spicctrl.spec
1 Summary:        Sony Vaio SPIC Control Program
2 Summary(pl.UTF-8):      Program do sterowania Sony Vaio SPIC
3 Name:           spicctrl
4 Version:        1.9
5 Release:        1
6 License:        GPL
7 Group:          Applications/System
8 Source0:        http://popies.net/sonypi/%{name}-%{version}.tar.bz2
9 # Source0-md5:  775a1959c03e59830303b8320ca379d2
10 URL:            http://popies.net/sonypi/
11 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
12
13 %description
14 This utility allows one to query and set a variety of parameters on
15 your Sony Vaio laptop computer, including:
16
17  - AC Power status
18  - Battery status
19  - Screen brightness
20  - Bluetooth device power status
21
22 %description -l pl.UTF-8
23 To narzędzie pozwala sprawdzać i ustawiać różne parametry laptopa Sony
24 Vaio, w tym:
25
26  - stan zasilania AC
27  - stan baterii
28  - jasność ekranu
29  - stan zasilania urzędzenia Bluetooth
30
31 %prep
32 %setup -q
33
34 %build
35 %{__make} \
36         CC="%{__cc}" \
37         CFLAGS="%{rpmcflags} -Wall -W"
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1}
42
43 install spicctrl $RPM_BUILD_ROOT%{_sbindir}
44 install spicctrl.1 $RPM_BUILD_ROOT%{_mandir}/man1
45
46 %clean
47 rm -rf $RPM_BUILD_ROOT
48
49 %post
50 # TODO: move to dev
51 if [ ! -c /dev/sonypi ]; then
52         rm -f /dev/sonypi
53         mknod /dev/sonypi c 10 250
54 fi
55 # TODO: use modprobe.d
56 if [ -e %{_sysconfdir}/modules.conf ]; then
57 grep 'alias char-major-10-250 sonypi' %{_sysconfdir}/modules.conf > /dev/null
58         RETVAL=$?
59         if [ $RETVAL -ne 0 ]; then
60 echo 'alias char-major-10-250 sonypi' >> %{_sysconfdir}/modules.conf
61 echo 'options sonypi minor=250' >> %{_sysconfdir}/modules.conf
62         fi
63 fi
64 if [ -e %{_sysconfdir}/modprobe.conf ]; then
65 grep 'alias char-major-10-250 sonypi' %{_sysconfdir}/modprobe.conf > /dev/null
66         RETVAL=$?
67         if [ $RETVAL -ne 0 ]; then
68 echo 'alias char-major-10-250 sonypi' >> %{_sysconfdir}/modprobe.conf
69 echo 'options sonypi minor=250' >> %{_sysconfdir}/modprobe.conf
70         fi
71 fi
72
73 %files
74 %defattr(644,root,root,755)
75 %doc AUTHORS CHANGES
76 %attr(755,root,root) %{_sbindir}/spicctrl
77 %{_mandir}/man1/spicctrl.1*
This page took 0.143778 seconds and 3 git commands to generate.