znc-vl.spec 14 KB

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