source: projects/specs/trunk/s/spicctrl/spicctrl-vl.spec @ 521

Revision 521, 2.8 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

Line 
1%define name    spicctrl
2%define version 1.8
3%define release 1%{?_dist_release}
4
5Summary:        Sony Vaio SPIC Control Program
6Summary(ja):    Sony Vaio ノート用ユーティリティ
7Name:           %{name}
8Version:        %{version}
9Release:        %{release}
10Source0:        http://popies.net/sonypi/%{name}-%{version}.tar.bz2
11License:        GPL
12Group:          Applications/System
13URL:            http://popies.net/sonypi/
14
15BuildRoot: %{_tmppath}/%{name}-%{version}-root
16
17
18%description
19This utility allows one to query and set a variety of parameters on your
20Sony 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
57if [ ! -c /dev/sonypi ]; then
58        rm -f /dev/sonypi
59        mknod /dev/sonypi c 10 250
60fi
61if [ -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
68fi
69if [ -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
76fi
77
78if [ -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
84fi
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.
Note: See TracBrowser for help on using the repository browser.