znc-vl.spec 15 KB

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