[2320] | 1 | %define tiarra tiarra |
---|
| 2 | %define tiarra_confdir %{_sysconfdir}/%{tiarra} |
---|
| 3 | %define tiarra_logdir %{_localstatedir}/log/%{tiarra} |
---|
| 4 | Summary: Tiarra - IRC Proxy software |
---|
[2364] | 5 | Summary(ja): Tiarra - IRC 用中継/クライアントプログラム |
---|
[2320] | 6 | Name: %{tiarra} |
---|
| 7 | Version: 20100212 |
---|
[3542] | 8 | Release: 6%{?_dist_release} |
---|
[2320] | 9 | URL: http://www.clovery.jp/%{tiarra}/ |
---|
| 10 | Source0: http://www.clovery.jp/tiarra/archive/2010/02/%{tiarra}-%{version}.tar.bz2 |
---|
[2343] | 11 | Source1: %{tiarra}-vine.conf |
---|
[2320] | 12 | Source2: %{tiarra}-init.sh |
---|
| 13 | Patch0: %{tiarra}-%{version}-vine.patch |
---|
| 14 | License: GPL+ or Artistic |
---|
[2343] | 15 | Group: Applications/Services |
---|
[2320] | 16 | Requires: perl >= 5.6.0 |
---|
[2343] | 17 | Requires(pre): shadow-utils |
---|
[2320] | 18 | Requires(post): chkconfig |
---|
[2343] | 19 | Requires(preun): chkconfig |
---|
| 20 | Requires(postun): shadow-utils |
---|
[2320] | 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, |
---|
[3542] | 30 | multi-io, object-oriented framework. |
---|
[2320] | 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} |
---|
[2343] | 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} |
---|
[2320] | 50 | mkdir -p ${RPM_BUILD_ROOT}%{tiarra_logdir} |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | %clean |
---|
| 54 | [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} |
---|
| 55 | |
---|
[2343] | 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 | |
---|
[2320] | 74 | %post |
---|
[3542] | 75 | if ! /sbin/chkconfig %{name}; then |
---|
[2320] | 76 | /sbin/chkconfig --add %{name} |
---|
[3542] | 77 | fi |
---|
| 78 | |
---|
| 79 | if [ $1 -eq 2 ]; then |
---|
[2343] | 80 | %{_initdir}/%{name} condrestart |
---|
[2320] | 81 | fi |
---|
| 82 | |
---|
| 83 | %preun |
---|
| 84 | if [ $1 = 0 ]; then |
---|
[2343] | 85 | %{_initdir}/%{name} stop |
---|
[2320] | 86 | /sbin/chkconfig --del %{name} |
---|
| 87 | fi |
---|
| 88 | |
---|
| 89 | %postun |
---|
[2343] | 90 | if [ $1 = 0 ]; then |
---|
| 91 | /usr/sbin/userdel %{name} |
---|
[2320] | 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 |
---|
[2343] | 104 | %{_initdir}/%{name} |
---|
| 105 | %attr(0750, %{name}, %{name}) %dir %{tiarra_logdir} |
---|
[2320] | 106 | |
---|
| 107 | |
---|
| 108 | %changelog |
---|
[3542] | 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 | |
---|
[2364] | 113 | * Sun Dec 19 2010 Shu KONNO <owa@bg.wakwak.com> 20100212-5 |
---|
| 114 | - fixed typo of Summary(ja) |
---|
| 115 | |
---|
[2343] | 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 | |
---|
[2320] | 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 | |
---|