groonga-vl.spec 15 KB

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