libkkc-vl.spec 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. %define ver 0.3.5
  2. %define rel 2
  3. %define dataver 0.2.7
  4. %define datarel 6
  5. %define from_git 0
  6. %if %{from_git}
  7. %define githash ccfd5c6d
  8. %endif
  9. %if "%{?_dist_release}" == "vl6"
  10. %define with_vala 0
  11. %else
  12. %define with_vala 1
  13. %endif
  14. Summary: Japanese Kana Kanji conversion library (libkkc)
  15. Name: libkkc
  16. Version: %{ver}
  17. %if %{from_git}
  18. Release: %{rel}.git%{githash}%{_dist_release}
  19. %else
  20. Release: %{rel}%{_dist_release}
  21. %endif
  22. License: GPLv3+
  23. Group: System Environment/Libraries
  24. URL: https://bitbucket.org/libkkc/libkkc/
  25. %if %{from_git}
  26. Source0: libkkc-%{githash}.tar.gz
  27. %else
  28. Source0: https://github.com/ueno/libkkc/releases/download/v%{version}/%{name}-%{version}.tar.gz
  29. %endif
  30. Source1: https://bitbucket.org/libkkc/libkkc-data/downloads/%{name}-data-%{dataver}.tar.xz
  31. Patch0: https://github.com/ueno/libkkc/commit/1f512da81a71287b13eb0a1f9b31830b16db2107.patch
  32. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
  33. BuildRequires: pkgconfig(gee-0.8)
  34. BuildRequires: libgee-vala
  35. BuildRequires: json-glib-devel
  36. BuildRequires: marisa-trie-devel
  37. # for libkkc-data
  38. BuildRequires: marisa-trie-python
  39. %if %{with_vala}
  40. BuildRequires: vala-devel
  41. BuildRequires: vala-tools
  42. %endif
  43. Requires: libkkc-data = %{dataver}-%{datarel}%{_dist_release}
  44. Requires: libkkc-common = %{version}-%{release}
  45. Vendor: Project Vine
  46. Distribution: Vine Linux
  47. Packager: iwaim
  48. %description
  49. libkkc provides a converter from Kana-string to
  50. Kana-Kanji-mixed-string. It was named after kkc.el in GNU Emacs, a
  51. simple Kana Kanji converter, while libkkc tries to convert sentences
  52. in a bit more complex way using N-gram language models.
  53. %package devel
  54. Summary: Header files and libraries for developing apps which will use libkkc
  55. Group: Development/Libraries
  56. Requires: %{name} = %{version}-%{release}
  57. %description devel
  58. The libkkc-devel package contains the header files and libraries.
  59. %package tools
  60. Summary: Tools for %{name}
  61. Group: Applications/Accessories
  62. Requires: %{name} = %{version}-%{release}
  63. %description tools
  64. The %{name}-tools package contains tools for developing applications
  65. that use %{name}.
  66. %package common
  67. Summary: Common data files for %{name}
  68. %description common
  69. The %{name}-common package contains the arch-independent data that
  70. %{name} uses at run time.
  71. %package data
  72. Summary: Data files for %{name}
  73. Version: %{dataver}
  74. Release: %{datarel}%{_dist_release}
  75. %description data
  76. The %{name}-data package contains the language model data that %{name}
  77. uses at run time.
  78. %prep
  79. %if %{from_git}
  80. %setup -q -n %{name}-%{githash}
  81. %else
  82. %setup -q
  83. %endif
  84. %patch0 -p1
  85. # for libkkc-data
  86. tar xf %{SOURCE1}
  87. %build
  88. %if %{from_git}
  89. ./autogen.sh
  90. %endif
  91. %configure --enable-shared --disable-static \
  92. --disable-silent-rules \
  93. %if %{with_vala}
  94. --enable-vala=yes \
  95. %else
  96. --enable-vala=no \
  97. %endif
  98. %__make
  99. # for libkkc-data
  100. pushd %{name}-data-%{dataver}
  101. %configure
  102. %__make
  103. popd
  104. %install
  105. %__rm -rf $RPM_BUILD_ROOT
  106. %makeinstall
  107. # for libkkc-data
  108. pushd %{name}-data-%{dataver}
  109. %makeinstall
  110. popd
  111. %find_lang %{name}
  112. # remove files
  113. %__rm -f $RPM_BUILD_ROOT%{_libdir}/libkkc.la
  114. %clean
  115. %__rm -rf $RPM_BUILD_ROOT
  116. %post -p /sbin/ldconfig
  117. %postun -p /sbin/ldconfig
  118. %files -f %{name}.lang
  119. %defattr(-,root,root,-)
  120. %doc README ChangeLog COPYING AUTHORS NEWS
  121. %doc data/rules/README.rules
  122. %{_libdir}/libkkc.so.*
  123. %{_libdir}/girepository-1.0/Kkc-1.0.typelib
  124. %dir %{_datadir}/libkkc
  125. %{_datadir}/libkkc/rules
  126. %files devel
  127. %defattr(-,root,root,-)
  128. %doc COPYING AUTHORS
  129. %dir %{_includedir}/libkkc
  130. %{_includedir}/libkkc/libkkc.h
  131. %{_libdir}/libkkc.so
  132. %{_libdir}/pkgconfig/kkc-1.0.pc
  133. %{_datadir}/gir-1.0/Kkc-1.0.gir
  134. %{_datadir}/vala/vapi/kkc-1.0.deps
  135. %{_datadir}/vala/vapi/kkc-1.0.vapi
  136. %files tools
  137. %defattr(-,root,root,-)
  138. %doc COPYING AUTHORS
  139. %{_bindir}/kkc
  140. %{_bindir}/kkc-package-data
  141. %files common
  142. %defattr(-,root,root,-)
  143. %doc COPYING AUTHORS
  144. %dir %{_datadir}/libkkc
  145. %dir %{_datadir}/libkkc/templates
  146. %{_datadir}/libkkc/templates/libkkc-data
  147. %files data
  148. %defattr(-,root,root,-)
  149. %doc COPYING AUTHORS
  150. %dir %{_libdir}/libkkc
  151. %dir %{_libdir}/libkkc/models
  152. %{_libdir}/libkkc/models/sorted3
  153. %changelog
  154. * Thu Apr 30 2015 IWAI, Masaharu <iwaim.sub@gmail.com> 0.3.5-2
  155. - add 'Try all possible okuri-gana combinations' patch (Patch0)
  156. - add BuildRequires: libgee-vala
  157. * Mon Dec 29 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 0.3.5-1
  158. - update to libkkc 0.3.5
  159. - switch upstream source location to GitHub
  160. * Mon Jul 7 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 0.3.4-1
  161. - update to libkkc 0.3.4
  162. - update BuildRequires for libgee
  163. * Sun Jun 15 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 0.3.3-1
  164. - update to libkkc 0.3.3
  165. * Wed Dec 18 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 0.3.2-1
  166. - update to libkkc 0.3.2
  167. * Thu Nov 7 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 0.3.1-1
  168. - update to libkkc 0.3.1
  169. - update to libkkc-data 0.2.7
  170. - fix changelog for 0.2.6-1
  171. * Sat Jul 27 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 0.2.6-1
  172. - update to libkkc 0.2.6
  173. - update to libkkc-data 0.2.5
  174. * Tue Jun 18 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 0.2.4-1
  175. - update to libkkc 0.2.4
  176. - update to libkkc-data 0.2.0
  177. - add Version tag for libkkc-data sub package
  178. * Tue Mar 26 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.10-1
  179. - update to libkkc 0.1.10
  180. * Sat Mar 16 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.9-1
  181. - update to libkkc 0.1.9
  182. * Sun Mar 3 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.8-1
  183. - update to libkkc 0.1.8
  184. * Sat Feb 23 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.7-1
  185. - update to libkkc 0.1.7
  186. * Fri Feb 15 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.6-1
  187. - update to libkkc 0.1.6
  188. - update to libkkc-data 0.1.6
  189. * Mon Feb 11 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.5-1
  190. - update to libkkc 0.1.5
  191. * Fri Feb 8 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.3-1
  192. - update to 0.1.3
  193. - update License value: GPLv3 -> GPLv3+
  194. - add BuildRequires: marisa-trie-python for libkkc-data
  195. - sync upstream spec: http://ueno.fedorapeople.org/libkkc/libkkc.spec 0.1.3-2
  196. - create tools sub package
  197. - move %%{_bindir}/kkc
  198. - add %%{_bindir}/kkc-package-data
  199. - create common sub package
  200. - add template for generating libkkc-data
  201. - merge libkkc-data SRPM file
  202. - add libkkc-data source file (Source1)
  203. - create data sub package
  204. - add '--disable-silent-rules' option for configure
  205. - add Requires libkkc-data and libkkc-common
  206. - add document: data/rules/README.rules
  207. * Wed Feb 6 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.2-1
  208. - update to 0.1.2
  209. * Tue Feb 5 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.1-1
  210. - update to 0.1.1
  211. * Fri Feb 1 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.0-1
  212. - update to 0.1.0
  213. - rename libkkc.pc to kkc-1.0.pc by upstream
  214. * Fri Feb 1 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-3.gitccfd5c6d
  215. - update to git ccfd5c6d9f913e0a413fe5d0c45bb70032382f68
  216. - add post and postun script
  217. - add translate file
  218. * Tue Jan 29 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-2
  219. - support Vine Linux 6
  220. - without Vala
  221. - BR: libgee-devel
  222. * Mon Jan 28 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-1
  223. - initial build for Vine Linux