tiarra-vl.spec 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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: 5%{?_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. %description
  28. Tiarra is pure-perl irc proxy(or bot) software, with single-thread,
  29. multi-io, object-oriented framework.
  30. %prep
  31. %setup -q -n %{name}-%{version}
  32. %patch0 -p1
  33. cp %{SOURCE1} .
  34. %build
  35. %install
  36. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  37. mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
  38. mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}
  39. install -m 755 %{name} ${RPM_BUILD_ROOT}%{_bindir}/%{name}
  40. cp -af bundle main module ${RPM_BUILD_ROOT}%{_datadir}/%{name}
  41. mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}
  42. install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/%{name}-vine-sample.conf
  43. mkdir -p ${RPM_BUILD_ROOT}%{_initdir}
  44. install -m 755 %{SOURCE2} ${RPM_BUILD_ROOT}%{_initdir}/%{name}
  45. mkdir -p ${RPM_BUILD_ROOT}%{tiarra_logdir}
  46. %clean
  47. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  48. %pre
  49. if [ $1 -ge 1 ]; then
  50. grep "%{name}:" /etc/group > /dev/null 2>&1
  51. if [ $? == 1 ]; then
  52. /usr/sbin/useradd -c "Tiarra IRC Proxy" -M -r -d / -s /sbin/nologin -U %{name}
  53. fi
  54. grep "%{name}:" /etc/passwd > /dev/null 2>&1
  55. if [ $? == 1 ]; then
  56. /usr/sbin/useradd -c "Tiarra IRC Proxy" -M -r -d / -s /sbin/nologin %{name}
  57. fi
  58. if [ -d %{tiarra_logdir} ]; then
  59. ls -ld %{tiarra_logdir} | grep root
  60. if [ $? = 0 ]; then
  61. chown -R %{name}:%{name} %{tiarra_logdir}
  62. fi
  63. fi
  64. fi
  65. %post
  66. if [ $1 == 1 ]; then
  67. /sbin/chkconfig --add %{name}
  68. #%{_initdir}/%{name} start
  69. else
  70. %{_initdir}/%{name} condrestart
  71. fi
  72. %preun
  73. if [ $1 = 0 ]; then
  74. %{_initdir}/%{name} stop
  75. /sbin/chkconfig --del %{name}
  76. fi
  77. %postun
  78. if [ $1 = 0 ]; then
  79. /usr/sbin/userdel %{name}
  80. fi
  81. %files
  82. %defattr(-, root, root)
  83. %doc AUTHORS ChangeLog ChangeLog.svn HACKING INSTALL LICENSE NEWS
  84. %doc *.conf doc
  85. %{_bindir}/%{name}
  86. %dir %{_datadir}/%{name}
  87. %{_datadir}/%{name}/*
  88. %dir %{_sysconfdir}/%{name}
  89. %{_sysconfdir}/%{name}/%{name}-vine-sample.conf
  90. %{_initdir}/%{name}
  91. %attr(0750, %{name}, %{name}) %dir %{tiarra_logdir}
  92. %changelog
  93. * Sun Dec 19 2010 Shu KONNO <owa@bg.wakwak.com> 20100212-5
  94. - fixed typo of Summary(ja)
  95. * Mon Dec 13 2010 Shu KONNO <owa@bg.wakwak.com> 20100212-4
  96. - changed rpm-package group to Applications/Services
  97. - updated tiarra-init.sh (set daemon user to %{name})
  98. - added %pre section
  99. - vine-sample.conf files together into one
  100. * Thu Dec 09 2010 Shu KONNO <owa@bg.wakwak.com> 20100212-2
  101. - initial build for VineSeed
  102. - added tiarra-20100212-vine.patch (by Masahiro INOUE)
  103. - added tiarra-vine-sample.conf (by Masahiro INOUE)
  104. - added tiarra-init.sh
  105. - added tiarra-vine.conf