groonga-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. %{!?use_lzo:%define use_lzo 0}
  2. %global _initddir %{_sysconfdir}/init.d/
  3. Name: groonga
  4. Version: 2.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. 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
  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
  49. Summary: Groonga server
  50. Group: Applications/Text
  51. License: LGPLv2 and (MIT or GPLv2)
  52. Requires: %{name}-server-common = %{version}-%{release}
  53. Requires: curl
  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.6-0
  61. %description server
  62. This package contains the groonga server
  63. %package httpd
  64. Summary: Groonga HTTP server
  65. Group: Applications/Text
  66. License: LGPLv2 and BSD
  67. Requires: %{name}-server-common = %{version}-%{release}
  68. Requires: pcre
  69. Obsoletes: %{name}-httpd < 2.0.6-0
  70. %description httpd
  71. This package contains the groonga HTTP server
  72. %package doc
  73. Summary: Documentation for groonga
  74. Group: Documentation
  75. License: LGPLv2 and BSD
  76. %description doc
  77. Documentation for groonga
  78. %package devel
  79. Summary: Libraries and header files for groonga
  80. Group: Development/Libraries
  81. Requires: %{name}-libs = %{version}-%{release}
  82. %description devel
  83. Libraries and header files for groonga
  84. %package tokenizer-mecab
  85. Summary: MeCab tokenizer for groonga
  86. Group: Applications/Text
  87. Requires: %{name}-libs = %{version}-%{release}
  88. Requires: mecab
  89. %description tokenizer-mecab
  90. MeCab tokenizer for groonga
  91. %package plugin-suggest
  92. Summary: Suggest plugin for groonga
  93. Group: Applications/Text
  94. Requires: %{name}-libs = %{version}-%{release}
  95. #Requires: messagepack
  96. #Requires: zeromq
  97. #Requires: libevent
  98. %description plugin-suggest
  99. Sugget plugin for groonga
  100. %package munin-plugins
  101. Summary: Munin plugins for groonga
  102. Group: Applications/System
  103. Requires: %{name}-libs = %{version}-%{release}
  104. Requires: munin-node
  105. Requires(post): munin-node
  106. Requires(post): /sbin/service
  107. Requires(postun): /sbin/service
  108. %description munin-plugins
  109. Munin plugins for groonga
  110. %prep
  111. #% define optflags -O0
  112. %setup -q
  113. %build
  114. %configure \
  115. --disable-static \
  116. --with-package-platform=redhat \
  117. --with-zlib \
  118. %if %{use_lzo}
  119. --with-lzo \
  120. %endif
  121. --with-munin-plugins
  122. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  123. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  124. make %{?_smp_mflags}
  125. %install
  126. rm -rf $RPM_BUILD_ROOT
  127. make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
  128. rm $RPM_BUILD_ROOT%{_libdir}/groonga/plugins/*/*.la
  129. rm $RPM_BUILD_ROOT%{_libdir}/*.la
  130. mv $RPM_BUILD_ROOT%{_datadir}/doc/groonga groonga-doc
  131. mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/groonga
  132. mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/groonga/db
  133. mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/groonga
  134. mv $RPM_BUILD_ROOT%{_datadir}/groonga/munin/ $RPM_BUILD_ROOT%{_datadir}/
  135. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/munin/plugin-conf.d/
  136. cat <<EOC > $RPM_BUILD_ROOT%{_sysconfdir}/munin/plugin-conf.d/groonga
  137. [groonga_*]
  138. user groonga
  139. group groonga
  140. env.PATH %{_bindir}
  141. env.pid_file %{_localstatedir}/run/groonga/groonga.pid
  142. env.path %{_localstatedir}/lib/groonga/db/db
  143. env.host 127.0.0.1
  144. env.port 10041
  145. env.log_path %{_localstatedir}/log/groonga/query.log
  146. EOC
  147. %clean
  148. rm -rf $RPM_BUILD_ROOT
  149. %pre server-common
  150. getent group groonga >/dev/null || groupadd -r groonga
  151. getent passwd groonga >/dev/null || \
  152. useradd -r -g groonga -d %{_localstatedir}/lib/groonga -s /sbin/nologin \
  153. -c 'groonga' groonga
  154. exit 0
  155. %post server
  156. /sbin/chkconfig --add groonga
  157. %post libs
  158. /sbin/ldconfig
  159. %post munin-plugins
  160. %{_sbindir}/munin-node-configure --shell --remove-also | grep -e 'groonga_' | sh
  161. [ -f %{_localstatedir}/lock/subsys/munin-node ] && \
  162. /sbin/service munin-node restart > /dev/null 2>&1
  163. :
  164. %preun server
  165. if [ $1 = 0 ] ; then
  166. /sbin/service groonga stop >/dev/null 2>&1 || :
  167. /sbin/chkconfig --del groonga
  168. fi
  169. %postun server
  170. if [ $1 -ge 1 ] ; then
  171. /sbin/service groonga condrestart >/dev/null 2>&1 || :
  172. fi
  173. %postun libs
  174. /sbin/ldconfig
  175. %postun munin-plugins
  176. if [ $1 -eq 0 ]; then
  177. [ -f %{_localstatedir}/lock/subsys/munin-node ] && \
  178. /sbin/service munin-node restart >/dev/null 2>&1
  179. :
  180. fi
  181. %files
  182. %defattr(-,root,root,-)
  183. %{_datadir}/man/man1/*
  184. %{_datadir}/man/*/man1/*
  185. %{_bindir}/groonga
  186. %{_bindir}/groonga-benchmark
  187. %files libs
  188. %defattr(-,root,root,-)
  189. %doc README AUTHORS COPYING
  190. %{_libdir}/*.so.*
  191. %dir %{_libdir}/groonga
  192. %dir %{_libdir}/groonga/plugins
  193. %dir %{_libdir}/groonga/plugins/tokenizers
  194. %{_libdir}/groonga/plugins/table/table.so
  195. %{_datadir}/groonga/
  196. %files server-common
  197. %files server
  198. %defattr(-,root,root,-)
  199. %config(noreplace) %{_sysconfdir}/groonga/
  200. %config(noreplace) %{_sysconfdir}/sysconfig/groonga
  201. %{_initddir}/*
  202. %ghost %dir %{_localstatedir}/run/%{name}
  203. %attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
  204. %attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db
  205. %files httpd
  206. %defattr(-,root,root,-)
  207. %config(noreplace) %{_sysconfdir}/groonga/httpd/*
  208. %{_sbindir}/groonga-httpd
  209. %files doc
  210. %defattr(-,root,root,-)
  211. %doc README AUTHORS COPYING
  212. %doc groonga-doc/*
  213. %files devel
  214. %defattr(-,root,root,-)
  215. %{_includedir}/groonga/
  216. %{_libdir}/*.so
  217. %{_libdir}/pkgconfig/groonga*.pc
  218. %files plugin-suggest
  219. %defattr(-,root,root,-)
  220. %{_bindir}/groonga-suggest-*
  221. %dir %{_libdir}/groonga/plugins
  222. %{_libdir}/groonga/plugins/suggest/suggest.so
  223. %files tokenizer-mecab
  224. %defattr(-,root,root,-)
  225. %{_libdir}/groonga/plugins/tokenizers/mecab.so
  226. %files munin-plugins
  227. %defattr(-,root,root,-)
  228. %{_datadir}/munin/plugins/*
  229. %config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/*
  230. %changelog
  231. * Sat Sep 15 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.6-1
  232. - initial build for Vine Linux.
  233. * Wed Aug 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.0.6-0
  234. - new upstream release.
  235. * Sun Jul 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.5-0
  236. - new upstream release.
  237. - split groonga-httpd related files into groonga-httpd package.
  238. * Fri Jun 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.4-0
  239. - new upstream release.
  240. - groonga package does not require groonga-tokenizer-mecab package.
  241. * Tue May 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.3-0
  242. - new upstream release.
  243. * Sun Apr 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.2-0
  244. - new upstream release.
  245. * Fri Mar 30 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-2
  246. - Use shutdown command for stop.
  247. * Fri Mar 30 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-1
  248. - Fix bind address argument parameter.
  249. Patch by Masaharu IWAI. Thanks!!!
  250. * Thu Mar 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-0
  251. - new upstream release.
  252. - grntest -> groonga-benchmark.
  253. - remove groong-tools package.
  254. * Wed Feb 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.0-0
  255. - new upstream release.
  256. - remove other permission from DB directory.
  257. - install init.d related files directly.
  258. - use HTTP as the default protocol.
  259. * Sun Jan 29 2012 Kouhei Sutou <kou@clear-code.com> - 1.3.0-0
  260. - new upstream release.
  261. - groonga-server package does not require groonga-munin-plugins package.
  262. suggested by Masaharu IWAI. Thanks!!!
  263. - groonga package does not require groonga-doc package.
  264. suggested by Masaharu IWAI. Thanks!!!
  265. * Thu Dec 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.9-0
  266. - new upstream release.
  267. * Tue Nov 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.8-0
  268. - new upstream release.
  269. - enable zlib support.
  270. - enable lzo support.
  271. - add --with-package-platform=redhat configure option to install init script.
  272. - add --with-munin-plugins cofnigure option to install Munin plugins.
  273. * Sat Oct 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.7-0
  274. - new upstream release.
  275. * Thu Sep 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.6-0
  276. - new upstream release.
  277. * Mon Aug 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.5-0
  278. - new upstream release.
  279. * Fri Jul 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.4-0
  280. - new upstream release.
  281. * Wed Jun 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.3-0
  282. - new upstream release.
  283. - add a new groong-tools package.
  284. * Sun May 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.2-0
  285. - new upstream release.
  286. - split server files into groonga-server package.
  287. * Fri Apr 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.1-0
  288. - new upstream release.
  289. * Tue Mar 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.0-0
  290. - new upstream release.
  291. * Wed Feb 09 2011 Kouhei Sutou <kou@clear-code.com> - 1.1.0-0
  292. - new upstream release.
  293. * Wed Feb 02 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.8-0
  294. - new upstream release.
  295. * Sat Jan 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.7-0
  296. - new upstream release.
  297. * Fri Dec 31 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.6-0
  298. - new upstream release
  299. * Wed Dec 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.5-0
  300. - new upstream release.
  301. * Mon Nov 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.4-1
  302. - new upstream release
  303. * Wed Nov 24 2010 Daiki Ueno <dueno@redhat.com> - 1.0.3-2
  304. - %%ghost /var/run/*.
  305. * Fri Oct 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.3-1
  306. - new upstream release.
  307. * Thu Oct 09 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.2-2
  308. - merge Fedora changes.
  309. * Thu Sep 09 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.2-1
  310. - new upstream release.
  311. * Mon Sep 06 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.1-1
  312. - new upstream release.
  313. * Thu Sep 02 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.0-1
  314. - split packages.
  315. * Tue Aug 24 2010 Daiki Ueno <dueno@redhat.com> - 0.7.6-1
  316. - initial packaging for Fedora