znc-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. # Define variables to use in conditionals
  2. %define use_systemd 0
  3. %define use_systemd 0
  4. %global __python %{__python3}
  5. Summary: An advanced IRC bouncer
  6. Name: znc
  7. Version: 1.4
  8. Release: 1%{?_dist_release}
  9. License: Apache Software License
  10. Group: System Environment/Daemons
  11. URL: http://znc.in
  12. Source0: http://znc.in/releases/znc-%{version}.tar.gz
  13. Vendor: Project Vine
  14. Distribution: Vine Linux
  15. Packager: tomop
  16. %if %{use_systemd}
  17. Source1: znc.service
  18. %endif
  19. %if !%{use_systemd}
  20. Source1: znc.init
  21. %endif
  22. # git clone https://github.com/znc/znc.git
  23. # cd znc
  24. # git archive --prefix=znc/ HEAD | xz > ../znc-0.097.tar.xz
  25. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  26. BuildRequires: gcc-c++ perl
  27. BuildRequires: openssl-devel >= 0.9.8
  28. BuildRequires: cyrus-sasl-devel
  29. #BuildRequires: c-ares-devel
  30. BuildRequires: automake
  31. BuildRequires: tcl perl(ExtUtils::Embed)
  32. Obsoletes: znc-extra <= %{version}-%{release}
  33. %if %{use_systemd}
  34. BuildRequires: systemd-units
  35. %endif
  36. Requires(pre): shadow-utils
  37. %if %{use_systemd}
  38. Requires(post): systemd-units
  39. Requires(post): systemd-sysv
  40. Requires(preun): systemd-units
  41. Requires(postun): systemd-units
  42. %endif
  43. %if !%{use_systemd}
  44. Requires(post): chkconfig
  45. Requires(preun): chkconfig
  46. # This is for /sbin/service
  47. Requires(preun): initscripts
  48. %endif
  49. %description
  50. ZNC is an IRC bouncer with many advanced features like detaching,
  51. multiple users, per channel playback buffer, SSL, IPv6, transparent
  52. DCC bouncing, Perl and C++ module support to name a few.
  53. %package devel
  54. Summary: Development files needed to compile ZNC modules
  55. Group: Development/Libraries
  56. Requires: %{name} = %{version}-%{release} pkgconfig
  57. Requires: openssl-devel glibc-devel
  58. #Requires: c-ares-devel
  59. BuildRequires: pkgconfig
  60. %description devel
  61. All includes and program files you need to compile your own znc
  62. modules.
  63. %package modtcl
  64. Summary: TCL module for ZNC
  65. Group: Development/Libraries
  66. Requires: %{name} = %{version}-%{release}
  67. Requires: tcl
  68. %description modtcl
  69. TCL module for ZNC
  70. %prep
  71. %setup -q -n %{name}-%{version}
  72. #%setup -q -n znc-1.0-beta1
  73. #%patch0 -p1
  74. %__perl -pi.add_release -e 's|(?<="ZNC \%1\.3f)|-%{release}|' znc.cpp
  75. chmod -x modules/q.cpp
  76. %build
  77. %configure \
  78. --with-module-prefix=%{_libdir}/znc \
  79. --enable-ipv6 --enable-sasl --disable-perl --enable-tcl
  80. %__make %{?_smp_mflags}
  81. %pre
  82. #%if %{use_systemd}
  83. getent group znc >/dev/null || groupadd -r znc
  84. getent passwd znc >/dev/null || \
  85. useradd -r -g znc -d /var/lib/znc -s /sbin/nologin \
  86. -c "Account for ZNC to run as" znc
  87. mkdir -p /var/lib/znc
  88. chown znc:znc /var/lib/znc
  89. #exit 0
  90. #%endif
  91. %install
  92. %__rm -Rf "%{buildroot}"
  93. %__make install DESTDIR="%{buildroot}"
  94. %if %{use_systemd}
  95. mkdir -p %buildroot%{_unitdir}
  96. install -m 0644 %{SOURCE1} %buildroot%{_unitdir}/znc.service
  97. %endif
  98. %if !%{use_systemd}
  99. mkdir -p %buildroot%{_initrddir}
  100. install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/znc
  101. %endif
  102. %clean
  103. %__rm -Rf "%{buildroot}"
  104. %post
  105. %if %{use_systemd}
  106. if [ $1 -eq 1 ] ; then
  107. # Initial installation
  108. /bin/systemctl daemon-reload >/dev/null 2>&1 || :
  109. fi
  110. %endif
  111. %if !%{use_systemd}
  112. # This adds the proper /etc/rc*.d links for the script
  113. /sbin/chkconfig --add znc
  114. %endif
  115. %postun
  116. %if %{use_systemd}
  117. /bin/systemctl daemon-reload >/dev/null 2>&1 || :
  118. if [ $1 -ge 1 ] ; then
  119. # Package upgrade, not uninstall
  120. /bin/systemctl try-restart znc.service >/dev/null 2>&1 || :
  121. fi
  122. %endif
  123. %if !%{use_systemd}
  124. if [ "$1" -ge "1" ] ; then
  125. /sbin/service znc condrestart >/dev/null 2>&1 || :
  126. fi
  127. %endif
  128. %preun
  129. %if %{use_systemd}
  130. if [ $1 -eq 0 ] ; then
  131. # Package removal, not upgrade
  132. /bin/systemctl --no-reload disable znc.service > /dev/null 2>&1 || :
  133. /bin/systemctl stop znc.service > /dev/null 2>&1 || :
  134. fi
  135. %endif
  136. %if !%{use_systemd}
  137. if [ $1 -eq 0 ] ; then
  138. /sbin/service znc stop >/dev/null 2>&1 || :
  139. /sbin/chkconfig --del znc || :
  140. fi
  141. %endif
  142. %files
  143. %defattr(-,root,root)
  144. %doc AUTHORS ChangeLog.txt LICENSE README.md
  145. %{_bindir}/znc
  146. %{_mandir}/man1/*
  147. %{_libdir}/znc/*.so
  148. %exclude %{_libdir}/znc/modtcl.so
  149. %{_datadir}/znc/
  150. %if %{use_systemd}
  151. %{_unitdir}/znc.service
  152. %endif
  153. %if !%{use_systemd}
  154. %{_initrddir}/znc
  155. %endif
  156. %files devel
  157. %defattr(-,root,root)
  158. %{_bindir}/znc-buildmod
  159. #%{_bindir}/znc-config
  160. %{_libdir}/pkgconfig/%{name}.pc
  161. %{_includedir}/znc/
  162. %files modtcl
  163. %defattr(-,root,root)
  164. %{_libdir}/znc/modtcl.so
  165. %changelog
  166. * Wed Jun 18 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4-1
  167. - new upstream release.
  168. * Sat Jan 04 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2-1
  169. - new upstream release.
  170. * Tue Mar 12 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0-2
  171. - initial build for Vine Linux.
  172. * Tue Nov 13 2012 Nick Bebout <nb@fedoraproject.org> - 1.0-1
  173. - Update to 1.0
  174. * Thu Oct 18 2012 Nick Bebout <nb@fedoraproject.org> - 1.0-0.2.beta1
  175. - Update to 1.0-beta1
  176. * Thu Sep 13 2012 Nick Bebout <nb@fedoraproject.org> - 1.0-0.1.alpha1
  177. - Update to 1.0-alpha1
  178. * Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.206-2
  179. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  180. * Mon Apr 16 2012 Nick Bebout <nb@fedoraproject.org> - 0.206-1
  181. - Upgrade to 0.206
  182. * Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.204-4
  183. - Rebuilt for c++ ABI breakage
  184. * Mon Jan 23 2012 Nick Bebout <nb@fedoraproject.org> - 0.204-2
  185. - Add init script for EPEL
  186. * Mon Jan 23 2012 Nick Bebout <nb@fedoraproject.org> - 0.204-1
  187. - Update to 0.204 to fix security issue CVE-2012-0033
  188. * Mon Jan 09 2012 Nick Bebout <nb@fedoraproject.org> - 0.202-2
  189. - Add glibc-devel, openssl-devel, c-ares-devel to requires for
  190. - znc-devel so znc-buildmod will work
  191. * Sun Sep 25 2011 Nick Bebout <nb@fedoraproject.org> - 0.202-1
  192. - Update to 0.202
  193. * Tue Aug 23 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-1
  194. - Update to 0.200
  195. * Mon Aug 15 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-0.5.rc1
  196. - Don't create the znc user on Fedora 14 and lower and on EPEL
  197. * Mon Aug 15 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-0.4.rc1
  198. - Change znc's homedir to /var/lib/znc
  199. * Sun Aug 14 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-0.3.rc1
  200. - Re-add modpython, it somehow got disabled accidentally
  201. - Also re-add modperl, it works now
  202. * Sun Aug 14 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-0.2.rc1
  203. - Create /home/znc upon install
  204. * Sat Aug 13 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-0.1.rc1
  205. - Update to 0.200-rc1
  206. * Sat Aug 6 2011 Nick Bebout <nb@fedoraproject.org> - 0.2-0.2.beta1
  207. - Update to 0.2-beta1, disable perl for now
  208. * Fri Aug 5 2011 Nick Bebout <nb@fedoraproject.org> - 0.2-0.1.alpha1
  209. - Update to 0.2-alpha1
  210. * Mon Aug 1 2011 Nick Bebout <nb@fedoraproject.org> - 0.099-0.1.20110801git
  211. - Update to latest git
  212. * Sat Apr 2 2011 Nick Bebout <nb@fedoraproject.org> - 0.098-2
  213. - Add provides for ZNC::Module to znc-modperl
  214. * Tue Mar 29 2011 Nick Bebout <nb@fedoraproject.org> - 0.098-1
  215. - Update to znc-0.098
  216. * Sat Mar 12 2011 Nick Bebout <nb@fedoraproject.org> - 0.098-0.3.rc1
  217. - Update to znc-0.098-rc1
  218. * Wed Mar 02 2011 Nick Bebout <nb@fedoraproject.org> - 0.098-0.2.beta
  219. - Update to znc-0.098-beta
  220. * Wed Feb 23 2011 Nick Bebout <nb@fedoraproject.org> - 0.098-0.1.alpha1
  221. - Update to znc 0.098-alpha1
  222. * Tue Feb 15 2011 Nick Bebout <nb@fedoraproject.org> - 0.097-8.20110215git
  223. - Update to latest git
  224. * Wed Feb 09 2011 Nick Bebout <nb@fedoraproject.org> - 0.097-7.svn2277
  225. - Update to svn2277
  226. * Mon Jan 24 2011 Nick Bebout <nb@fedoraproject.org> - 0.097-6.svn2272
  227. - Update to svn2272
  228. * Mon Jan 17 2011 Nick Bebout <nb@fedoraproject.org> - 0.097-5.svn2269
  229. - Update to svn2269
  230. * Fri Jan 7 2011 Nick Bebout <nb@fedoraproject.org> - 0.097-4.svn2255
  231. - Update to svn2255
  232. * Mon Jan 3 2011 David Malcolm <dmalcolm@redhat.com> - 0.097-3.svn2214
  233. - rebuild for newer python3 (see rhbz#666429)
  234. * Fri Dec 24 2010 Nick Bebout <nb@fedoraproject.org> - 0.097-2.svn2214
  235. - Patch has been upstreamed, update to svn2214
  236. * Wed Dec 22 2010 Nick Bebout <nb@fedoraproject.org> - 0.097-1.svn2213
  237. - Update to znc 0.097-svn2213 which also adds modpython
  238. * Sun Nov 7 2010 Nick Bebout <nb@fedoraproject.org> - 0.096-2
  239. - Build TCL module, move modperl and modtcl to separate subpackages
  240. * Sat Nov 6 2010 Nick Bebout <nb@fedoraproject.org> - 0.096-1
  241. - Update to znc 0.096
  242. * Fri Sep 10 2010 Nick Bebout <nb@fedoraproject.org> - 0.094-1
  243. - Update to znc 0.094
  244. * Tue Aug 10 2010 Nick Bebout <nb@fedoraproject.org> - 0.093-2.svn2101
  245. - Update to znc 0.093.svn2101 to fix CVE-2010-2812 and CVE-2010-2934
  246. * Tue Aug 3 2010 Nick Bebout <nb@fedoraproject.org> - 0.093-1.svn2098
  247. - Update to znc 0.093 svn2098
  248. * Wed Jul 14 2010 Nick Bebout <nb@fedoraproject.org> - 0.092-1
  249. - Update to znc 0.092
  250. * Wed Jun 16 2010 Nick Bebout <nb@fedoraproject.org> - 0.090-2
  251. - Backport r2026 of ZNC subversion repo to fix bug 603915
  252. - NULL pointer dereference flaw leads to segfault under certain conditions
  253. * Sun Jun 06 2010 Nick Bebout <nb@fedoraproject.org> - 0.090-1
  254. - Update to znc 0.090
  255. * Thu May 27 2010 Nick Bebout <nb@fedoraproject.org> - 0.090-0.1.rc1
  256. - Update to znc 0.090-rc1
  257. * Thu May 27 2010 Nick Bebout <nb@fedoraproject.org> - 0.089-7.svn2004
  258. - Update to znc 0.089.svn2004
  259. * Tue May 18 2010 Nick Bebout <nb@fedoraproject.org> - 0.089-6.svn2000
  260. - Re-enable saslauth
  261. * Tue May 18 2010 Nick Bebout <nb@fedoraproject.org> - 0.089-5.svn2000
  262. - Re-enable modperl
  263. * Tue May 18 2010 Nick Bebout <nb@fedoraproject.org> - 0.089-4.svn2000
  264. - Update to znc 0.089.svn2000
  265. * Sun Apr 25 2010 Nick Bebout <nb@fedoraproject.org> - 0.089-3.svn1944
  266. - Update to znc 0.089.svn1944
  267. * Wed Apr 7 2010 Nick Bebout <nb@fedoraproject.org> - 0.081-2.svn1897
  268. - Update to znc 0.081.svn1897
  269. * Mon Mar 29 2010 Nick Bebout <nb@fedoraproject.org> - 0.081-1.svn1850
  270. - Update to znc 0.081.svn1850
  271. * Thu Feb 18 2010 Nick Bebout <nb@fedoraproject.org> - 0.080-1
  272. - Update to znc 0.080
  273. * Wed Dec 30 2009 Nick Bebout <nb@fedoraproject.org> - 0.078-1
  274. - Update to znc 0.078
  275. * Sun Dec 13 2009 Nick Bebout <nb@fedoraproject.org> - 0.078-0.1.rc1
  276. - Update to znc 0.078.rc1
  277. * Mon Dec 7 2009 Nick Bebout <nb@fedoraproject.org> - 0.077-1.svn1672
  278. - Add a DCCVHost config option which specifies the VHost (IP only!) for DCC bouncing. (r1647)
  279. - Users cloned via the admin module no longer automatically connect into IRC. (r1653)
  280. - Inform new clients about their /away status. (r1655)
  281. - The "BUG" messages from route_replies can now be turned off via /msg *route_replies silent yes. (r1660)
  282. - Rewrite znc.conf on SIGUSR1. (r1666)
  283. - ISpoofFormat now supports ExpandString. (r1670)
  284. - Allow specifing port and password for delserver. (r1640)
  285. - Write the config file on restart and shutdown. (r1641)
  286. - Disable c-ares if it is not found unless --enable-c-ares was used. (r1644) (r1645)
  287. - blockuser was missing an admin check. (r1648)
  288. - Sometimes, removing a server caused znc to lose track of which server it is connected to. (r1659)
  289. - Include a more portable header for uint32_t in SHA256.h. (r1665)
  290. - Fixed cases where ZNC didn't properly block PONG replies to its own PINGs. (r1668)
  291. - Fixed a possible crash if a client disconnected before an auth module was able to verify the login. (r1669)
  292. - Away allowed to accidentally execute IRC commands. (r1672)
  293. - Comment out some weird code in Client.cpp. (r1646)
  294. - Remove connect_throttle since it's obsoleted by fail2ban. (r1649)
  295. - Remove outdated sample znc.conf. (r1654)
  296. - route_replies now got a higher timeout before it generates a "BUG" message. (r1657)
  297. - Documented the signals on which znc reacts better. (r1667)
  298. - New module hook OnIRCConnecting(). (r1638)
  299. - Remove obsolete CUtils::GetHashPass(). (r1642)
  300. - A module's GetDescription() now returns a C-String. (r1661) (r1662)
  301. - When opening a module, check the version number first and don't do anything on a mismatch. (r1663)
  302. * Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 0.076-3
  303. - rebuild against perl 5.10.1
  304. * Fri Sep 25 2009 Nick Bebout <nb@fedoraproject.org> - 0.076-2
  305. - Fix missing dist tag
  306. * Fri Sep 25 2009 Nick Bebout <nb@fedoraproject.org> - 0.076-1
  307. - Upgrade to ZNC 0.076
  308. - http://en.znc.in/wiki/ChangeLog/0.076
  309. * Fri Aug 28 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-8.svn1613
  310. - Rebuild with new openssl and svn 1613
  311. - build 0.075-7.svn1610 existed but I had to remove it from the spec because
  312. - the date was earlier than the date tmraz build the new openssl one
  313. * Wed Aug 26 2009 Tomas Mraz <tmraz@redhat.com> - 0.075-6.svn1608
  314. - rebuilt with new openssl
  315. * Thu Aug 20 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-5.svn1608
  316. - Upgrade to svn 1608
  317. * Tue Aug 18 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-4.20090818svn1602
  318. - Upgrade to svn 1602
  319. * Sat Aug 8 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-3.20090807svn1594
  320. - Fix source filename
  321. * Fri Aug 7 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-2.20090807svn1594
  322. - Fix broken source tarball
  323. * Fri Aug 7 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-1.20090807svn1594
  324. - Upgrade to svn 1594
  325. * Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.074-2
  326. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  327. * Thu Jul 23 2009 Nick Bebout <nb@fedoraproject.org> - 0.074-1
  328. - Update to 0.074
  329. * Wed Jul 22 2009 Nick Bebout <nb@fedoraproject.org> - 0.072-3
  330. - Fix date in changelog, disable c-ares
  331. * Wed Jul 22 2009 Nick Bebout <nb@fedoraproject.org> - 0.072-2
  332. - Backport patch to fix webadmin skins issue introduced in 0.072
  333. * Wed Jul 22 2009 Nick Bebout <nb@fedoraproject.org> - 0.072-1
  334. - Upgrade to 0.072 of ZNC, fixes security issue in bug # 513152
  335. * Sun Jul 12 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-7
  336. - Fix License: to be GPLv2 with exceptions
  337. * Sat Jul 11 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-6
  338. - Fix permissions error in %%prep, not in source
  339. * Sat Jul 11 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-5
  340. - Fix permissions error on q.cpp and add LICENSE.OpenSSL
  341. * Sat Jul 11 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-4
  342. - Remove switch to enable debug, fix %%files section
  343. * Fri Jul 10 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-3
  344. - Move fixfreenode and log into separate znc-extra package
  345. - Move awayping into separate znc-awayping package
  346. * Thu Jul 9 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-2
  347. - Include modules with main package
  348. * Wed Jul 8 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-1
  349. - Initial Fedora package based on 0.070 of upstream