123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- %define tiarra tiarra
- %define tiarra_confdir %{_sysconfdir}/%{tiarra}
- %define tiarra_logdir %{_localstatedir}/log/%{tiarra}
- Summary: Tiarra - IRC Proxy software
- Summary(ja): Tiarra - IRC 用中継/クライアントプログラム
- Name: %{tiarra}
- Version: 20100212
- Release: 5%{?_dist_release}
- URL: http://www.clovery.jp/%{tiarra}/
- Source0: http://www.clovery.jp/tiarra/archive/2010/02/%{tiarra}-%{version}.tar.bz2
- Source1: %{tiarra}-vine.conf
- Source2: %{tiarra}-init.sh
- Patch0: %{tiarra}-%{version}-vine.patch
- License: GPL+ or Artistic
- Group: Applications/Services
- Requires: perl >= 5.6.0
- Requires(pre): shadow-utils
- Requires(post): chkconfig
- Requires(preun): chkconfig
- Requires(postun): shadow-utils
- BuildArch: noarch
- Autoreq: no
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- Vendor: Project Vine
- Distribution: Vine Linux
- Packager: miyabi owa
- %description
- Tiarra is pure-perl irc proxy(or bot) software, with single-thread,
- multi-io, object-oriented framework.
- %prep
- %setup -q -n %{name}-%{version}
- %patch0 -p1
- cp %{SOURCE1} .
- %build
- %install
- [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
- mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
- mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}
- install -m 755 %{name} ${RPM_BUILD_ROOT}%{_bindir}/%{name}
- cp -af bundle main module ${RPM_BUILD_ROOT}%{_datadir}/%{name}
- mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}
- install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/%{name}-vine-sample.conf
- mkdir -p ${RPM_BUILD_ROOT}%{_initdir}
- install -m 755 %{SOURCE2} ${RPM_BUILD_ROOT}%{_initdir}/%{name}
- mkdir -p ${RPM_BUILD_ROOT}%{tiarra_logdir}
- %clean
- [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
- %pre
- if [ $1 -ge 1 ]; then
- grep "%{name}:" /etc/group > /dev/null 2>&1
- if [ $? == 1 ]; then
- /usr/sbin/useradd -c "Tiarra IRC Proxy" -M -r -d / -s /sbin/nologin -U %{name}
- fi
- grep "%{name}:" /etc/passwd > /dev/null 2>&1
- if [ $? == 1 ]; then
- /usr/sbin/useradd -c "Tiarra IRC Proxy" -M -r -d / -s /sbin/nologin %{name}
- fi
- if [ -d %{tiarra_logdir} ]; then
- ls -ld %{tiarra_logdir} | grep root
- if [ $? = 0 ]; then
- chown -R %{name}:%{name} %{tiarra_logdir}
- fi
- fi
- fi
- %post
- if [ $1 == 1 ]; then
- /sbin/chkconfig --add %{name}
- #%{_initdir}/%{name} start
- else
- %{_initdir}/%{name} condrestart
- fi
- %preun
- if [ $1 = 0 ]; then
- %{_initdir}/%{name} stop
- /sbin/chkconfig --del %{name}
- fi
- %postun
- if [ $1 = 0 ]; then
- /usr/sbin/userdel %{name}
- fi
- %files
- %defattr(-, root, root)
- %doc AUTHORS ChangeLog ChangeLog.svn HACKING INSTALL LICENSE NEWS
- %doc *.conf doc
- %{_bindir}/%{name}
- %dir %{_datadir}/%{name}
- %{_datadir}/%{name}/*
- %dir %{_sysconfdir}/%{name}
- %{_sysconfdir}/%{name}/%{name}-vine-sample.conf
- %{_initdir}/%{name}
- %attr(0750, %{name}, %{name}) %dir %{tiarra_logdir}
- %changelog
- * Sun Dec 19 2010 Shu KONNO <owa@bg.wakwak.com> 20100212-5
- - fixed typo of Summary(ja)
- * Mon Dec 13 2010 Shu KONNO <owa@bg.wakwak.com> 20100212-4
- - changed rpm-package group to Applications/Services
- - updated tiarra-init.sh (set daemon user to %{name})
- - added %pre section
- - vine-sample.conf files together into one
- * Thu Dec 09 2010 Shu KONNO <owa@bg.wakwak.com> 20100212-2
- - initial build for VineSeed
- - added tiarra-20100212-vine.patch (by Masahiro INOUE)
- - added tiarra-vine-sample.conf (by Masahiro INOUE)
- - added tiarra-init.sh
- - added tiarra-vine.conf
|