1 | %define tiarra tiarra |
---|
2 | %define tiarra_confdir %{_sysconfdir}/%{tiarra} |
---|
3 | %define tiarra_logdir %{_localstatedir}/log/%{tiarra} |
---|
4 | Summary: Tiarra - IRC Proxy software |
---|
5 | Summary(ja): Tiarra - IRC 用中継/クライアントプログラム |
---|
6 | Name: %{tiarra} |
---|
7 | Version: 20100212 |
---|
8 | Release: 6%{?_dist_release} |
---|
9 | URL: http://www.clovery.jp/%{tiarra}/ |
---|
10 | Source0: http://www.clovery.jp/tiarra/archive/2010/02/%{tiarra}-%{version}.tar.bz2 |
---|
11 | Source1: %{tiarra}-vine.conf |
---|
12 | Source2: %{tiarra}-init.sh |
---|
13 | Patch0: %{tiarra}-%{version}-vine.patch |
---|
14 | License: GPL+ or Artistic |
---|
15 | Group: Applications/Services |
---|
16 | Requires: perl >= 5.6.0 |
---|
17 | Requires(pre): shadow-utils |
---|
18 | Requires(post): chkconfig |
---|
19 | Requires(preun): chkconfig |
---|
20 | Requires(postun): shadow-utils |
---|
21 | BuildArch: noarch |
---|
22 | Autoreq: no |
---|
23 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
24 | Vendor: Project Vine |
---|
25 | Distribution: Vine Linux |
---|
26 | Packager: miyabi owa |
---|
27 | |
---|
28 | %description |
---|
29 | Tiarra is pure-perl irc proxy(or bot) software, with single-thread, |
---|
30 | multi-io, object-oriented framework. |
---|
31 | |
---|
32 | %prep |
---|
33 | %setup -q -n %{name}-%{version} |
---|
34 | %patch0 -p1 |
---|
35 | cp %{SOURCE1} . |
---|
36 | |
---|
37 | %build |
---|
38 | |
---|
39 | %install |
---|
40 | [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} |
---|
41 | mkdir -p ${RPM_BUILD_ROOT}%{_bindir} |
---|
42 | mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name} |
---|
43 | install -m 755 %{name} ${RPM_BUILD_ROOT}%{_bindir}/%{name} |
---|
44 | cp -af bundle main module ${RPM_BUILD_ROOT}%{_datadir}/%{name} |
---|
45 | |
---|
46 | mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name} |
---|
47 | install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/%{name}-vine-sample.conf |
---|
48 | mkdir -p ${RPM_BUILD_ROOT}%{_initdir} |
---|
49 | install -m 755 %{SOURCE2} ${RPM_BUILD_ROOT}%{_initdir}/%{name} |
---|
50 | mkdir -p ${RPM_BUILD_ROOT}%{tiarra_logdir} |
---|
51 | |
---|
52 | |
---|
53 | %clean |
---|
54 | [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} |
---|
55 | |
---|
56 | %pre |
---|
57 | if [ $1 -ge 1 ]; then |
---|
58 | grep "%{name}:" /etc/group > /dev/null 2>&1 |
---|
59 | if [ $? == 1 ]; then |
---|
60 | /usr/sbin/useradd -c "Tiarra IRC Proxy" -M -r -d / -s /sbin/nologin -U %{name} |
---|
61 | fi |
---|
62 | grep "%{name}:" /etc/passwd > /dev/null 2>&1 |
---|
63 | if [ $? == 1 ]; then |
---|
64 | /usr/sbin/useradd -c "Tiarra IRC Proxy" -M -r -d / -s /sbin/nologin %{name} |
---|
65 | fi |
---|
66 | if [ -d %{tiarra_logdir} ]; then |
---|
67 | ls -ld %{tiarra_logdir} | grep root |
---|
68 | if [ $? = 0 ]; then |
---|
69 | chown -R %{name}:%{name} %{tiarra_logdir} |
---|
70 | fi |
---|
71 | fi |
---|
72 | fi |
---|
73 | |
---|
74 | %post |
---|
75 | if ! /sbin/chkconfig %{name}; then |
---|
76 | /sbin/chkconfig --add %{name} |
---|
77 | fi |
---|
78 | |
---|
79 | if [ $1 -eq 2 ]; then |
---|
80 | %{_initdir}/%{name} condrestart |
---|
81 | fi |
---|
82 | |
---|
83 | %preun |
---|
84 | if [ $1 = 0 ]; then |
---|
85 | %{_initdir}/%{name} stop |
---|
86 | /sbin/chkconfig --del %{name} |
---|
87 | fi |
---|
88 | |
---|
89 | %postun |
---|
90 | if [ $1 = 0 ]; then |
---|
91 | /usr/sbin/userdel %{name} |
---|
92 | fi |
---|
93 | |
---|
94 | |
---|
95 | %files |
---|
96 | %defattr(-, root, root) |
---|
97 | %doc AUTHORS ChangeLog ChangeLog.svn HACKING INSTALL LICENSE NEWS |
---|
98 | %doc *.conf doc |
---|
99 | %{_bindir}/%{name} |
---|
100 | %dir %{_datadir}/%{name} |
---|
101 | %{_datadir}/%{name}/* |
---|
102 | %dir %{_sysconfdir}/%{name} |
---|
103 | %{_sysconfdir}/%{name}/%{name}-vine-sample.conf |
---|
104 | %{_initdir}/%{name} |
---|
105 | %attr(0750, %{name}, %{name}) %dir %{tiarra_logdir} |
---|
106 | |
---|
107 | |
---|
108 | %changelog |
---|
109 | * Mon Apr 18 2011 Masahiro INOUE <miyabi.-.inoue@nifty.com> 20100210-6 |
---|
110 | - VineSeed and Vine 5.x was integrated. |
---|
111 | - fix %post section |
---|
112 | |
---|
113 | * Sun Dec 19 2010 Shu KONNO <owa@bg.wakwak.com> 20100212-5 |
---|
114 | - fixed typo of Summary(ja) |
---|
115 | |
---|
116 | * Mon Dec 13 2010 Shu KONNO <owa@bg.wakwak.com> 20100212-4 |
---|
117 | - changed rpm-package group to Applications/Services |
---|
118 | - updated tiarra-init.sh (set daemon user to %{name}) |
---|
119 | - added %pre section |
---|
120 | - vine-sample.conf files together into one |
---|
121 | |
---|
122 | * Thu Dec 09 2010 Shu KONNO <owa@bg.wakwak.com> 20100212-2 |
---|
123 | - initial build for VineSeed |
---|
124 | - added tiarra-20100212-vine.patch (by Masahiro INOUE) |
---|
125 | - added tiarra-vine-sample.conf (by Masahiro INOUE) |
---|
126 | - added tiarra-init.sh |
---|
127 | - added tiarra-vine.conf |
---|
128 | |
---|