1 | %define name spicctrl |
---|
2 | %define version 1.8 |
---|
3 | %define release 1%{?_dist_release} |
---|
4 | |
---|
5 | Summary: Sony Vaio SPIC Control Program |
---|
6 | Summary(ja): Sony Vaio ノート用ユーティリティ |
---|
7 | Name: %{name} |
---|
8 | Version: %{version} |
---|
9 | Release: %{release} |
---|
10 | Source0: http://popies.net/sonypi/%{name}-%{version}.tar.bz2 |
---|
11 | License: GPL |
---|
12 | Group: Applications/System |
---|
13 | URL: http://popies.net/sonypi/ |
---|
14 | |
---|
15 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
16 | |
---|
17 | |
---|
18 | %description |
---|
19 | This utility allows one to query and set a variety of parameters on your |
---|
20 | Sony Vaio laptop computer, including: |
---|
21 | |
---|
22 | * AC Power status |
---|
23 | * Battery status |
---|
24 | * Screen brightness |
---|
25 | * Bluetooth device power status |
---|
26 | |
---|
27 | %description -l ja |
---|
28 | このユーティリティにより Sony Vaio ノートの以下の情報を取得/設定 |
---|
29 | することができます。 |
---|
30 | * AC電源の状態 |
---|
31 | * バッテリーの状態 |
---|
32 | * 画面の輝度 |
---|
33 | * ブルートゥースデバイスの状態 |
---|
34 | |
---|
35 | |
---|
36 | %prep |
---|
37 | |
---|
38 | %setup |
---|
39 | |
---|
40 | %build |
---|
41 | %__make |
---|
42 | |
---|
43 | |
---|
44 | %install |
---|
45 | %__rm -rf ${RPM_BUILD_ROOT} |
---|
46 | %__install -d ${RPM_BUILD_ROOT}/%{_sbindir} |
---|
47 | %__install -m755 %{_builddir}/%{name}-%{version}/spicctrl ${RPM_BUILD_ROOT}/%{_sbindir} |
---|
48 | %__install -d ${RPM_BUILD_ROOT}/%{_mandir}/man1 |
---|
49 | %__install -m644 %{_builddir}/%{name}-%{version}/spicctrl.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1/ |
---|
50 | |
---|
51 | |
---|
52 | %clean |
---|
53 | %__rm -rf ${RPM_BUILD_ROOT} |
---|
54 | |
---|
55 | |
---|
56 | %post |
---|
57 | if [ ! -c /dev/sonypi ]; then |
---|
58 | rm -f /dev/sonypi |
---|
59 | mknod /dev/sonypi c 10 250 |
---|
60 | fi |
---|
61 | if [ -e /etc/modules.conf ]; then |
---|
62 | grep 'alias char-major-10-250 sonypi' /etc/modules.conf > /dev/null |
---|
63 | RETVAL=$? |
---|
64 | if [ $RETVAL -ne 0 ]; then |
---|
65 | echo 'alias char-major-10-250 sonypi' >> /etc/modules.conf |
---|
66 | echo 'options sonypi minor=250' >> /etc/modules.conf |
---|
67 | fi |
---|
68 | fi |
---|
69 | if [ -e /etc/modprobe.conf ]; then |
---|
70 | grep 'alias char-major-10-250 sonypi' /etc/modprobe.conf > /dev/null |
---|
71 | RETVAL=$? |
---|
72 | if [ $RETVAL -ne 0 ]; then |
---|
73 | echo 'alias char-major-10-250 sonypi' >> /etc/modprobe.conf |
---|
74 | echo 'options sonypi minor=250' >> /etc/modprobe.conf |
---|
75 | fi |
---|
76 | fi |
---|
77 | |
---|
78 | if [ -e /etc/security/console.perms ]; then |
---|
79 | if ! grep -q '<sonypi>=/dev/sonypi' /etc/security/console.perms; then |
---|
80 | echo -e '\n# following 2 lines are added by spicctrl package.' >> /etc/security/console.perms |
---|
81 | echo '<sonypi>=/dev/sonypi' >> /etc/security/console.perms |
---|
82 | echo '<console> 0600 <sonypi> 0600 root' >> /etc/security/console.perms |
---|
83 | fi |
---|
84 | fi |
---|
85 | |
---|
86 | |
---|
87 | %files |
---|
88 | %defattr(-,root,root) |
---|
89 | %doc AUTHORS LICENSE CHANGES |
---|
90 | %{_sbindir}/spicctrl |
---|
91 | %{_mandir}/man1/spicctrl.1* |
---|
92 | |
---|
93 | %changelog |
---|
94 | * Sat Oct 11 2008 Shu KONNO <owa@bg.wakwak.com> 1.8-1vl5 |
---|
95 | - applied new versioning policy, spec in utf-8 |
---|
96 | |
---|
97 | * Sun Apr 17 2005 Kazutaka HAHARA <kazutaka@dc4.so-net.ne.jp> 1.8-0vl3 |
---|
98 | - allow console user to access sonypi device.(by console.perms) |
---|
99 | |
---|
100 | * Sun Apr 03 2005 Kazutaka HAHARA <kazutaka@dc4.so-net.ne.jp> 1.8-0vl0 |
---|
101 | - build for Vine Plus. |
---|
102 | |
---|
103 | * Wed Mar 30 2005 Kazutaka HAHARA <kazutaka@dc4.so-net.ne.jp> 1.8-0vl1 |
---|
104 | - initial build for VineSeed Plus. |
---|