groonga-vl.spec 14 KB

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