groonga-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. %global _initddir %{_sysconfdir}/init.d/
  2. Name: groonga
  3. Summary: An Embeddable Fulltext Search Engine
  4. Version: 11.0.0
  5. Release: 1%{?_dist_release}
  6. Group: office
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. Packager: tomop, iwaim
  10. License: LGPLv2
  11. URL: http://groonga.org/
  12. Source0: http://packages.groonga.org/source/groonga/groonga-%{version}.tar.gz
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
  14. BuildRequires: mecab-devel
  15. BuildRequires: zlib-devel
  16. BuildRequires: lz4-devel
  17. BuildRequires: libzstd-devel
  18. BuildRequires: pcre-devel
  19. Requires: %{name}-libs = %{version}-%{release}
  20. Requires: %{name}-plugin-suggest = %{version}-%{release}
  21. %description
  22. Groonga is an embeddable full-text search engine library. It can
  23. integrate with DBMS and scripting languages to enhance their search
  24. functionality. It also provides a standalone data store server based
  25. on relational data model.
  26. %package libs
  27. Summary: Runtime libraries for groonga
  28. Group: system
  29. License: LGPLv2 and (MIT or GPLv2)
  30. %description libs
  31. This package contains the libraries for groonga
  32. %package server-common
  33. Summary: Common packages for the groonga server and the groonga HTTP server
  34. Group: servers
  35. License: LGPLv2
  36. Requires: %{name} = %{version}-%{release}
  37. Requires(pre): shadow-utils
  38. %description server-common
  39. This package provides common settings for server use
  40. %package server-gqtp
  41. Summary: Groonga GQTP server
  42. Group: servers
  43. License: LGPLv2
  44. Requires: %{name}-server-common = %{version}-%{release}
  45. Requires(pre): shadow-utils
  46. Requires(post): /sbin/chkconfig
  47. Requires(preun): /sbin/chkconfig
  48. Requires(preun): /sbin/service
  49. Requires(postun): /sbin/service
  50. Obsoletes: %{name} < 1.2.2-0
  51. Obsoletes: %{name}-server < 2.0.7-0
  52. %description server-gqtp
  53. This package contains the groonga GQTP server
  54. %package server-http
  55. Summary: Groonga HTTP server (transitional)
  56. Group: servers
  57. License: LGPLv2
  58. Requires: %{name}-server-common = %{version}-%{release}
  59. Requires: curl
  60. Requires(pre): shadow-utils
  61. Requires(post): /sbin/chkconfig
  62. Requires(preun): /sbin/chkconfig
  63. Requires(preun): /sbin/service
  64. Requires(postun): /sbin/service
  65. Obsoletes: %{name} < 1.2.2-0
  66. Obsoletes: %{name}-server < 2.0.7-0
  67. %description server-http
  68. This is a transitional package to groonga-httpd.
  69. %package httpd
  70. Summary: Groonga HTTP server
  71. Group: servers
  72. License: LGPLv2 and BSD
  73. Requires: %{name}-server-common = %{version}-%{release}
  74. Provides: %{name}-server-http = %{version}-%{release}
  75. Obsoletes: %{name}-server-http <= 4.0.7-2
  76. %description httpd
  77. This package contains the groonga HTTP server. It is experimental
  78. but has many features. Because it is based on nginx HTTP server.
  79. It will obsolete groonga-server-http when it is stable.
  80. %package doc
  81. Summary: Documentation for groonga
  82. Group: documentation
  83. License: LGPLv2 and BSD
  84. %description doc
  85. Documentation for Groonga
  86. %package devel
  87. Summary: Libraries and header files for Groonga
  88. Group: programming
  89. Requires: %{name}-libs = %{version}-%{release}
  90. %description devel
  91. Libraries and header files for Groonga
  92. %package tokenizer-mecab
  93. Summary: MeCab tokenizer for Groonga
  94. Group: office
  95. Requires: %{name}-libs = %{version}-%{release}
  96. %description tokenizer-mecab
  97. MeCab tokenizer for Groonga
  98. %package plugin-suggest
  99. Summary: Suggest plugin for Groonga
  100. Group: office
  101. Requires: %{name}-libs = %{version}-%{release}
  102. %description plugin-suggest
  103. Sugget plugin for Groonga
  104. %package munin-plugins
  105. Summary: Munin plugins for Groonga
  106. Group: system
  107. Requires: %{name}-libs = %{version}-%{release}
  108. Requires: munin-node
  109. Requires(post): munin-node
  110. Requires(post): /sbin/service
  111. Requires(postun): /sbin/service
  112. %description munin-plugins
  113. Munin plugins for Groonga
  114. %debug_package
  115. %prep
  116. #% define optflags -O0
  117. %setup -q
  118. %build
  119. %configure \
  120. --disable-static \
  121. --with-package-platform=centos6 \
  122. --with-zlib \
  123. --with-lz4 \
  124. --with-zstd \
  125. --with-mecab \
  126. --with-munin-plugins \
  127. --enable-mruby
  128. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  129. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  130. make %{?_smp_mflags}
  131. %install
  132. rm -rf $RPM_BUILD_ROOT
  133. make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
  134. rm $RPM_BUILD_ROOT%{_libdir}/groonga/plugins/*/*.la
  135. rm $RPM_BUILD_ROOT%{_libdir}/*.la
  136. mv $RPM_BUILD_ROOT%{_datadir}/doc/groonga groonga-doc
  137. mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/groonga
  138. mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/groonga/db
  139. mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/groonga
  140. mv $RPM_BUILD_ROOT%{_datadir}/groonga/munin/ $RPM_BUILD_ROOT%{_datadir}/
  141. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/munin/plugin-conf.d/
  142. cat <<EOC > $RPM_BUILD_ROOT%{_sysconfdir}/munin/plugin-conf.d/groonga
  143. [groonga_*]
  144. user groonga
  145. group groonga
  146. env.PATH %{_bindir}
  147. env.database_path %{_localstatedir}/lib/groonga/db/db
  148. env.host 127.0.0.1
  149. env.http_host 127.0.0.1
  150. env.http_port 10041
  151. env.http_database_path %{_localstatedir}/lib/groonga/db/db
  152. env.http_pid_path %{_localstatedir}/run/groonga/groonga-http.pid
  153. env.http_query_log_path %{_localstatedir}/log/groonga/query-http.log
  154. env.httpd_host 127.0.0.1
  155. env.httpd_port 10041
  156. env.httpd_database_path %{_localstatedir}/lib/groonga/db/db
  157. env.httpd_pid_path %{_localstatedir}/run/groonga/groonga-httpd.pid
  158. env.httpd_query_log_path %{_localstatedir}/log/groonga/httpd/groonga-query.log
  159. env.gqtp_host 127.0.0.1
  160. env.gqtp_port 10043
  161. env.gqtp_database_path %{_localstatedir}/lib/groonga/db/db
  162. env.gqtp_pid_path %{_localstatedir}/run/groonga/groonga-gqtp.pid
  163. env.gqtp_query_log_path %{_localstatedir}/log/groonga/query-gqtp.log
  164. EOC
  165. # this file is needed by systemd only
  166. rm -rf %{buildroot}%{_sysconfdir}/tmpfiles.d
  167. %clean
  168. rm -rf $RPM_BUILD_ROOT
  169. %pre server-common
  170. getent group groonga >/dev/null || groupadd -r groonga
  171. getent passwd groonga >/dev/null || \
  172. useradd -r -g groonga -d %{_localstatedir}/lib/groonga -s /sbin/nologin \
  173. -c 'groonga' groonga
  174. if [ $1 = 1 ]; then
  175. mkdir -p %{_localstatedir}/lib/groonga/db
  176. groonga -n %{_localstatedir}/lib/groonga/db/db shutdown > /dev/null
  177. chown -R groonga:groonga %{_localstatedir}/lib/groonga
  178. mkdir -p %{_localstatedir}/run/groonga
  179. chown -R groonga:groonga %{_localstatedir}/run/groonga
  180. fi
  181. exit 0
  182. %post server-gqtp
  183. /sbin/chkconfig --add groonga-server-gqtp
  184. %post server-http
  185. /sbin/chkconfig --add groonga-server-http
  186. %post httpd
  187. if [ $1 = 1 ] ; then
  188. mkdir -p %{_localstatedir}/log/groonga/httpd
  189. chown -R groonga:groonga %{_localstatedir}/log/groonga/httpd
  190. elif [ $1 = 2 ] ; then
  191. /sbin/service groonga-httpd restart >/dev/null 2>&1 || :
  192. fi
  193. %post munin-plugins
  194. %{_sbindir}/munin-node-configure --shell --remove-also | grep -e 'groonga_' | sh
  195. [ -f %{_localstatedir}/lock/subsys/munin-node ] && \
  196. /sbin/service munin-node restart > /dev/null 2>&1
  197. :
  198. %preun server-http
  199. if [ $1 = 0 ] ; then
  200. /sbin/service groonga-server-http stop >/dev/null 2>&1 || :
  201. /sbin/chkconfig --del groonga-server-http
  202. fi
  203. %postun server-http
  204. if [ $1 -ge 1 ] ; then
  205. /sbin/service groonga-server-http condrestart >/dev/null 2>&1 || :
  206. fi
  207. %preun server-gqtp
  208. if [ $1 = 0 ] ; then
  209. /sbin/service groonga-server-http stop >/dev/null 2>&1 || :
  210. /sbin/chkconfig --del groonga-server-gqtp
  211. fi
  212. %postun server-gqtp
  213. if [ $1 -ge 1 ] ; then
  214. /sbin/service groonga-server-gqtp condrestart >/dev/null 2>&1 || :
  215. fi
  216. %postun munin-plugins
  217. if [ $1 -eq 0 ]; then
  218. [ -f %{_localstatedir}/lock/subsys/munin-node ] && \
  219. /sbin/service munin-node restart >/dev/null 2>&1
  220. :
  221. fi
  222. %triggerpostun -n groonga-server-common -- groonga-server-common < 2.0.8-2
  223. chown -R groonga:groonga %{_localstatedir}/lib/groonga
  224. chown -R groonga:groonga %{_localstatedir}/run/groonga
  225. %files
  226. %defattr(-,root,root,-)
  227. %{_bindir}/groonga
  228. %{_bindir}/groonga-benchmark
  229. %{_bindir}/grndb
  230. %files libs
  231. %defattr(-,root,root,-)
  232. %license COPYING
  233. %doc README.md
  234. %{_libdir}/*.so.*
  235. %{_libdir}/groonga
  236. %{_datadir}/groonga
  237. %config(noreplace) %{_sysconfdir}/groonga/synonyms.tsv
  238. %files server-common
  239. %files server-gqtp
  240. %defattr(-,root,root,-)
  241. %config(noreplace) %{_sysconfdir}/groonga/
  242. %config(noreplace) %{_sysconfdir}/sysconfig/groonga-server-gqtp
  243. %config(noreplace) %{_sysconfdir}/logrotate.d/groonga-server-gqtp
  244. %{_initddir}/groonga-server-gqtp
  245. %ghost %dir %{_localstatedir}/run/%{name}
  246. %attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
  247. %attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db
  248. %files server-http
  249. %defattr(-,root,root,-)
  250. %config(noreplace) %{_sysconfdir}/groonga/
  251. %config(noreplace) %{_sysconfdir}/sysconfig/groonga-server-http
  252. %config(noreplace) %{_sysconfdir}/logrotate.d/groonga-server-http
  253. %{_initddir}/groonga-server-http
  254. %ghost %dir %{_localstatedir}/run/%{name}
  255. %attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
  256. %attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db
  257. %files httpd
  258. %defattr(-,root,root,-)
  259. %config(noreplace) %{_sysconfdir}/groonga/httpd/*
  260. %config(noreplace) %{_sysconfdir}/sysconfig/groonga-httpd
  261. %config(noreplace) %{_sysconfdir}/logrotate.d/groonga-httpd
  262. %{_initddir}/groonga-httpd
  263. %{_sbindir}/groonga-httpd
  264. %{_sbindir}/groonga-httpd-restart
  265. %ghost %dir %{_localstatedir}/run/%{name}
  266. %attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
  267. %attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db
  268. %files doc
  269. %defattr(-,root,root,-)
  270. %license COPYING
  271. %doc README.md
  272. %doc groonga-doc/*
  273. %files devel
  274. %defattr(-,root,root,-)
  275. %{_includedir}/groonga/
  276. %{_libdir}/*.so
  277. %{_libdir}/pkgconfig/groonga*.pc
  278. %files plugin-suggest
  279. %defattr(-,root,root,-)
  280. %{_bindir}/groonga-suggest-*
  281. %dir %{_libdir}/groonga/plugins
  282. %{_libdir}/groonga/plugins/suggest/suggest.so
  283. %files tokenizer-mecab
  284. %defattr(-,root,root,-)
  285. %{_libdir}/groonga/plugins/tokenizers/mecab.so
  286. %files munin-plugins
  287. %defattr(-,root,root,-)
  288. %{_datadir}/munin/plugins/*
  289. %config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/*
  290. %changelog
  291. * Fri Mar 19 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-1
  292. - new upstream release.
  293. - dropped ldconfig scriptlets.
  294. * Wed Sep 04 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.7-1
  295. - new upstream release.
  296. * Wed May 08 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.2-1
  297. - new upstream release.
  298. - added BR:libxcrypt-devel.
  299. * Sat Dec 30 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.1.0-1
  300. - new upstream release.
  301. * Mon May 1 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.2-1
  302. - new upstream release.
  303. * Tue Dec 13 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.1.1-1
  304. - new upstream release.
  305. * Wed Jun 29 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.0.5-1
  306. - new upstream release.
  307. * Mon Nov 30 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.1.0-1
  308. - new upstream release.
  309. * Mon Sep 29 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.6-1
  310. - new upstream release.
  311. * Sat May 31 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.2-1
  312. - new upstream release.
  313. * Mon Mar 31 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.1-1
  314. - new upstream release.
  315. * Tue Feb 11 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.0-1
  316. - new upstream release.
  317. * Sun Dec 29 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.1-1
  318. - new upstream release.
  319. * Wed Dec 04 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.0-1
  320. - new upstream release.
  321. * Mon Feb 11 2013 IWAI, Masaharu <iwai@alib.jp> 3.0.0-1
  322. - update to 3.0.0
  323. - drop groonga-server-http script patch (Patch0): upstream merged
  324. - add grn_index_cursor_next() patch (Patch1) from upstream git
  325. - add Packager: iwaim
  326. * Thu Feb 7 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.8-2
  327. - fix pre script for groonga-server-common sub package
  328. - add triggerpostun script: groonga-server-common < 2.0.8-2
  329. - add groonga-server-http script patch (Patch0)
  330. * Fri Nov 16 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.8-1
  331. - new upstream release.
  332. * Sat Sep 15 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.6-1
  333. - initial build for Vine Linux.
  334. * Wed Aug 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.0.6-0
  335. - new upstream release.
  336. * Sun Jul 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.5-0
  337. - new upstream release.
  338. - split groonga-httpd related files into groonga-httpd package.
  339. * Fri Jun 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.4-0
  340. - new upstream release.
  341. - groonga package does not require groonga-tokenizer-mecab package.
  342. * Tue May 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.3-0
  343. - new upstream release.
  344. * Sun Apr 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.2-0
  345. - new upstream release.
  346. * Fri Mar 30 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-2
  347. - Use shutdown command for stop.
  348. * Fri Mar 30 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-1
  349. - Fix bind address argument parameter.
  350. Patch by Masaharu IWAI. Thanks!!!
  351. * Thu Mar 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-0
  352. - new upstream release.
  353. - grntest -> groonga-benchmark.
  354. - remove groong-tools package.
  355. * Wed Feb 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.0-0
  356. - new upstream release.
  357. - remove other permission from DB directory.
  358. - install init.d related files directly.
  359. - use HTTP as the default protocol.
  360. * Sun Jan 29 2012 Kouhei Sutou <kou@clear-code.com> - 1.3.0-0
  361. - new upstream release.
  362. - groonga-server package does not require groonga-munin-plugins package.
  363. suggested by Masaharu IWAI. Thanks!!!
  364. - groonga package does not require groonga-doc package.
  365. suggested by Masaharu IWAI. Thanks!!!
  366. * Thu Dec 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.9-0
  367. - new upstream release.
  368. * Tue Nov 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.8-0
  369. - new upstream release.
  370. - enable zlib support.
  371. - enable lzo support.
  372. - add --with-package-platform=redhat configure option to install init script.
  373. - add --with-munin-plugins cofnigure option to install Munin plugins.
  374. * Sat Oct 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.7-0
  375. - new upstream release.
  376. * Thu Sep 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.6-0
  377. - new upstream release.
  378. * Mon Aug 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.5-0
  379. - new upstream release.
  380. * Fri Jul 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.4-0
  381. - new upstream release.
  382. * Wed Jun 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.3-0
  383. - new upstream release.
  384. - add a new groong-tools package.
  385. * Sun May 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.2-0
  386. - new upstream release.
  387. - split server files into groonga-server package.
  388. * Fri Apr 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.1-0
  389. - new upstream release.
  390. * Tue Mar 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.0-0
  391. - new upstream release.
  392. * Wed Feb 09 2011 Kouhei Sutou <kou@clear-code.com> - 1.1.0-0
  393. - new upstream release.
  394. * Wed Feb 02 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.8-0
  395. - new upstream release.
  396. * Sat Jan 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.7-0
  397. - new upstream release.
  398. * Fri Dec 31 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.6-0
  399. - new upstream release
  400. * Wed Dec 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.5-0
  401. - new upstream release.
  402. * Mon Nov 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.4-1
  403. - new upstream release
  404. * Wed Nov 24 2010 Daiki Ueno <dueno@redhat.com> - 1.0.3-2
  405. - %%ghost /var/run/*.
  406. * Fri Oct 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.3-1
  407. - new upstream release.
  408. * Sat Oct 09 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.2-2
  409. - merge Fedora changes.
  410. * Thu Sep 09 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.2-1
  411. - new upstream release.
  412. * Mon Sep 06 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.1-1
  413. - new upstream release.
  414. * Thu Sep 02 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.0-1
  415. - split packages.
  416. * Tue Aug 24 2010 Daiki Ueno <dueno@redhat.com> - 0.7.6-1
  417. - initial packaging for Fedora