znc-vl.spec 14 KB

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