groonga-vl.spec 15 KB

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