libkkc-vl.spec 7.2 KB

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