znc-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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.2
  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. 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/modules_online.so
  180. %{_libdir}/znc/nickserv.so
  181. %{_libdir}/znc/notes.so
  182. %{_libdir}/znc/notify_connect.so
  183. %{_libdir}/znc/partyline.so
  184. %{_libdir}/znc/perform.so
  185. %{_libdir}/znc/q.so
  186. %{_libdir}/znc/raw.so
  187. %{_libdir}/znc/route_replies.so
  188. %{_libdir}/znc/sample.so
  189. %{_libdir}/znc/sasl.so
  190. %{_libdir}/znc/savebuff.so
  191. %{_libdir}/znc/schat.so
  192. %{_libdir}/znc/send_raw.so
  193. %{_libdir}/znc/shell.so
  194. %{_libdir}/znc/simple_away.so
  195. %{_libdir}/znc/stickychan.so
  196. %{_libdir}/znc/watch.so
  197. %{_libdir}/znc/webadmin.so
  198. %{_datadir}/znc/
  199. %if %{use_systemd}
  200. %{_unitdir}/znc.service
  201. %endif
  202. %if !%{use_systemd}
  203. %{_initrddir}/znc
  204. %endif
  205. %files devel
  206. %defattr(-,root,root)
  207. %{_bindir}/znc-buildmod
  208. #%{_bindir}/znc-config
  209. %{_libdir}/pkgconfig/%{name}.pc
  210. %{_includedir}/znc/
  211. %files modtcl
  212. %defattr(-,root,root)
  213. %{_libdir}/znc/modtcl.so
  214. %changelog
  215. * Sat Jan 04 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2-1
  216. - new upstream release.
  217. * Tue Mar 12 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0-2
  218. - initial build for Vine Linux.
  219. * Tue Nov 13 2012 Nick Bebout <nb@fedoraproject.org> - 1.0-1
  220. - Update to 1.0
  221. * Thu Oct 18 2012 Nick Bebout <nb@fedoraproject.org> - 1.0-0.2.beta1
  222. - Update to 1.0-beta1
  223. * Thu Sep 13 2012 Nick Bebout <nb@fedoraproject.org> - 1.0-0.1.alpha1
  224. - Update to 1.0-alpha1
  225. * Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.206-2
  226. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  227. * Mon Apr 16 2012 Nick Bebout <nb@fedoraproject.org> - 0.206-1
  228. - Upgrade to 0.206
  229. * Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.204-4
  230. - Rebuilt for c++ ABI breakage
  231. * Mon Jan 23 2012 Nick Bebout <nb@fedoraproject.org> - 0.204-2
  232. - Add init script for EPEL
  233. * Mon Jan 23 2012 Nick Bebout <nb@fedoraproject.org> - 0.204-1
  234. - Update to 0.204 to fix security issue CVE-2012-0033
  235. * Mon Jan 09 2012 Nick Bebout <nb@fedoraproject.org> - 0.202-2
  236. - Add glibc-devel, openssl-devel, c-ares-devel to requires for
  237. - znc-devel so znc-buildmod will work
  238. * Sun Sep 25 2011 Nick Bebout <nb@fedoraproject.org> - 0.202-1
  239. - Update to 0.202
  240. * Tue Aug 23 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-1
  241. - Update to 0.200
  242. * Mon Aug 15 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-0.5.rc1
  243. - Don't create the znc user on Fedora 14 and lower and on EPEL
  244. * Mon Aug 15 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-0.4.rc1
  245. - Change znc's homedir to /var/lib/znc
  246. * Sun Aug 14 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-0.3.rc1
  247. - Re-add modpython, it somehow got disabled accidentally
  248. - Also re-add modperl, it works now
  249. * Sun Aug 14 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-0.2.rc1
  250. - Create /home/znc upon install
  251. * Sat Aug 13 2011 Nick Bebout <nb@fedoraproject.org> - 0.200-0.1.rc1
  252. - Update to 0.200-rc1
  253. * Sat Aug 6 2011 Nick Bebout <nb@fedoraproject.org> - 0.2-0.2.beta1
  254. - Update to 0.2-beta1, disable perl for now
  255. * Fri Aug 5 2011 Nick Bebout <nb@fedoraproject.org> - 0.2-0.1.alpha1
  256. - Update to 0.2-alpha1
  257. * Mon Aug 1 2011 Nick Bebout <nb@fedoraproject.org> - 0.099-0.1.20110801git
  258. - Update to latest git
  259. * Sat Apr 2 2011 Nick Bebout <nb@fedoraproject.org> - 0.098-2
  260. - Add provides for ZNC::Module to znc-modperl
  261. * Tue Mar 29 2011 Nick Bebout <nb@fedoraproject.org> - 0.098-1
  262. - Update to znc-0.098
  263. * Sat Mar 12 2011 Nick Bebout <nb@fedoraproject.org> - 0.098-0.3.rc1
  264. - Update to znc-0.098-rc1
  265. * Wed Mar 02 2011 Nick Bebout <nb@fedoraproject.org> - 0.098-0.2.beta
  266. - Update to znc-0.098-beta
  267. * Wed Feb 23 2011 Nick Bebout <nb@fedoraproject.org> - 0.098-0.1.alpha1
  268. - Update to znc 0.098-alpha1
  269. * Tue Feb 15 2011 Nick Bebout <nb@fedoraproject.org> - 0.097-8.20110215git
  270. - Update to latest git
  271. * Wed Feb 09 2011 Nick Bebout <nb@fedoraproject.org> - 0.097-7.svn2277
  272. - Update to svn2277
  273. * Mon Jan 24 2011 Nick Bebout <nb@fedoraproject.org> - 0.097-6.svn2272
  274. - Update to svn2272
  275. * Mon Jan 17 2011 Nick Bebout <nb@fedoraproject.org> - 0.097-5.svn2269
  276. - Update to svn2269
  277. * Fri Jan 7 2011 Nick Bebout <nb@fedoraproject.org> - 0.097-4.svn2255
  278. - Update to svn2255
  279. * Mon Jan 3 2011 David Malcolm <dmalcolm@redhat.com> - 0.097-3.svn2214
  280. - rebuild for newer python3 (see rhbz#666429)
  281. * Fri Dec 24 2010 Nick Bebout <nb@fedoraproject.org> - 0.097-2.svn2214
  282. - Patch has been upstreamed, update to svn2214
  283. * Wed Dec 22 2010 Nick Bebout <nb@fedoraproject.org> - 0.097-1.svn2213
  284. - Update to znc 0.097-svn2213 which also adds modpython
  285. * Sun Nov 7 2010 Nick Bebout <nb@fedoraproject.org> - 0.096-2
  286. - Build TCL module, move modperl and modtcl to separate subpackages
  287. * Sat Nov 6 2010 Nick Bebout <nb@fedoraproject.org> - 0.096-1
  288. - Update to znc 0.096
  289. * Fri Sep 10 2010 Nick Bebout <nb@fedoraproject.org> - 0.094-1
  290. - Update to znc 0.094
  291. * Tue Aug 10 2010 Nick Bebout <nb@fedoraproject.org> - 0.093-2.svn2101
  292. - Update to znc 0.093.svn2101 to fix CVE-2010-2812 and CVE-2010-2934
  293. * Tue Aug 3 2010 Nick Bebout <nb@fedoraproject.org> - 0.093-1.svn2098
  294. - Update to znc 0.093 svn2098
  295. * Wed Jul 14 2010 Nick Bebout <nb@fedoraproject.org> - 0.092-1
  296. - Update to znc 0.092
  297. * Wed Jun 16 2010 Nick Bebout <nb@fedoraproject.org> - 0.090-2
  298. - Backport r2026 of ZNC subversion repo to fix bug 603915
  299. - NULL pointer dereference flaw leads to segfault under certain conditions
  300. * Sun Jun 06 2010 Nick Bebout <nb@fedoraproject.org> - 0.090-1
  301. - Update to znc 0.090
  302. * Thu May 27 2010 Nick Bebout <nb@fedoraproject.org> - 0.090-0.1.rc1
  303. - Update to znc 0.090-rc1
  304. * Thu May 27 2010 Nick Bebout <nb@fedoraproject.org> - 0.089-7.svn2004
  305. - Update to znc 0.089.svn2004
  306. * Tue May 18 2010 Nick Bebout <nb@fedoraproject.org> - 0.089-6.svn2000
  307. - Re-enable saslauth
  308. * Tue May 18 2010 Nick Bebout <nb@fedoraproject.org> - 0.089-5.svn2000
  309. - Re-enable modperl
  310. * Tue May 18 2010 Nick Bebout <nb@fedoraproject.org> - 0.089-4.svn2000
  311. - Update to znc 0.089.svn2000
  312. * Sun Apr 25 2010 Nick Bebout <nb@fedoraproject.org> - 0.089-3.svn1944
  313. - Update to znc 0.089.svn1944
  314. * Wed Apr 7 2010 Nick Bebout <nb@fedoraproject.org> - 0.081-2.svn1897
  315. - Update to znc 0.081.svn1897
  316. * Mon Mar 29 2010 Nick Bebout <nb@fedoraproject.org> - 0.081-1.svn1850
  317. - Update to znc 0.081.svn1850
  318. * Thu Feb 18 2010 Nick Bebout <nb@fedoraproject.org> - 0.080-1
  319. - Update to znc 0.080
  320. * Wed Dec 30 2009 Nick Bebout <nb@fedoraproject.org> - 0.078-1
  321. - Update to znc 0.078
  322. * Sun Dec 13 2009 Nick Bebout <nb@fedoraproject.org> - 0.078-0.1.rc1
  323. - Update to znc 0.078.rc1
  324. * Mon Dec 7 2009 Nick Bebout <nb@fedoraproject.org> - 0.077-1.svn1672
  325. - Add a DCCVHost config option which specifies the VHost (IP only!) for DCC bouncing. (r1647)
  326. - Users cloned via the admin module no longer automatically connect into IRC. (r1653)
  327. - Inform new clients about their /away status. (r1655)
  328. - The "BUG" messages from route_replies can now be turned off via /msg *route_replies silent yes. (r1660)
  329. - Rewrite znc.conf on SIGUSR1. (r1666)
  330. - ISpoofFormat now supports ExpandString. (r1670)
  331. - Allow specifing port and password for delserver. (r1640)
  332. - Write the config file on restart and shutdown. (r1641)
  333. - Disable c-ares if it is not found unless --enable-c-ares was used. (r1644) (r1645)
  334. - blockuser was missing an admin check. (r1648)
  335. - Sometimes, removing a server caused znc to lose track of which server it is connected to. (r1659)
  336. - Include a more portable header for uint32_t in SHA256.h. (r1665)
  337. - Fixed cases where ZNC didn't properly block PONG replies to its own PINGs. (r1668)
  338. - Fixed a possible crash if a client disconnected before an auth module was able to verify the login. (r1669)
  339. - Away allowed to accidentally execute IRC commands. (r1672)
  340. - Comment out some weird code in Client.cpp. (r1646)
  341. - Remove connect_throttle since it's obsoleted by fail2ban. (r1649)
  342. - Remove outdated sample znc.conf. (r1654)
  343. - route_replies now got a higher timeout before it generates a "BUG" message. (r1657)
  344. - Documented the signals on which znc reacts better. (r1667)
  345. - New module hook OnIRCConnecting(). (r1638)
  346. - Remove obsolete CUtils::GetHashPass(). (r1642)
  347. - A module's GetDescription() now returns a C-String. (r1661) (r1662)
  348. - When opening a module, check the version number first and don't do anything on a mismatch. (r1663)
  349. * Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 0.076-3
  350. - rebuild against perl 5.10.1
  351. * Fri Sep 25 2009 Nick Bebout <nb@fedoraproject.org> - 0.076-2
  352. - Fix missing dist tag
  353. * Fri Sep 25 2009 Nick Bebout <nb@fedoraproject.org> - 0.076-1
  354. - Upgrade to ZNC 0.076
  355. - http://en.znc.in/wiki/ChangeLog/0.076
  356. * Fri Aug 28 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-8.svn1613
  357. - Rebuild with new openssl and svn 1613
  358. - build 0.075-7.svn1610 existed but I had to remove it from the spec because
  359. - the date was earlier than the date tmraz build the new openssl one
  360. * Wed Aug 26 2009 Tomas Mraz <tmraz@redhat.com> - 0.075-6.svn1608
  361. - rebuilt with new openssl
  362. * Thu Aug 20 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-5.svn1608
  363. - Upgrade to svn 1608
  364. * Tue Aug 18 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-4.20090818svn1602
  365. - Upgrade to svn 1602
  366. * Sat Aug 8 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-3.20090807svn1594
  367. - Fix source filename
  368. * Fri Aug 7 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-2.20090807svn1594
  369. - Fix broken source tarball
  370. * Fri Aug 7 2009 Nick Bebout <nb@fedoraproject.org> - 0.075-1.20090807svn1594
  371. - Upgrade to svn 1594
  372. * Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.074-2
  373. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  374. * Thu Jul 23 2009 Nick Bebout <nb@fedoraproject.org> - 0.074-1
  375. - Update to 0.074
  376. * Wed Jul 22 2009 Nick Bebout <nb@fedoraproject.org> - 0.072-3
  377. - Fix date in changelog, disable c-ares
  378. * Wed Jul 22 2009 Nick Bebout <nb@fedoraproject.org> - 0.072-2
  379. - Backport patch to fix webadmin skins issue introduced in 0.072
  380. * Wed Jul 22 2009 Nick Bebout <nb@fedoraproject.org> - 0.072-1
  381. - Upgrade to 0.072 of ZNC, fixes security issue in bug # 513152
  382. * Sun Jul 12 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-7
  383. - Fix License: to be GPLv2 with exceptions
  384. * Sat Jul 11 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-6
  385. - Fix permissions error in %%prep, not in source
  386. * Sat Jul 11 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-5
  387. - Fix permissions error on q.cpp and add LICENSE.OpenSSL
  388. * Sat Jul 11 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-4
  389. - Remove switch to enable debug, fix %%files section
  390. * Fri Jul 10 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-3
  391. - Move fixfreenode and log into separate znc-extra package
  392. - Move awayping into separate znc-awayping package
  393. * Thu Jul 9 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-2
  394. - Include modules with main package
  395. * Wed Jul 8 2009 Nick Bebout <nb@fedoraproject.org> - 0.070-1
  396. - Initial Fedora package based on 0.070 of upstream