libkkc-vl.spec 7.0 KB

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