libkkc-vl.spec 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. %define ver 0.2.6
  2. %define rel 1
  3. %define dataver 0.2.5
  4. %define from_git 0
  5. %if %{from_git}
  6. %define githash ccfd5c6d
  7. %endif
  8. %if "%{?_dist_release}" == "vl6"
  9. %define with_vala 0
  10. %else
  11. %define with_vala 1
  12. %endif
  13. Summary: Japanese Kana Kanji conversion library (libkkc)
  14. Name: libkkc
  15. Version: %{ver}
  16. %if %{from_git}
  17. Release: %{rel}.git%{githash}%{_dist_release}
  18. %else
  19. Release: %{rel}%{_dist_release}
  20. %endif
  21. License: GPLv3+
  22. Group: System Environment/Libraries
  23. URL: https://bitbucket.org/libkkc/libkkc/
  24. %if %{from_git}
  25. Source0: libkkc-%{githash}.tar.gz
  26. %else
  27. Source0: https://bitbucket.org/libkkc/libkkc/downloads/%{name}-%{version}.tar.gz
  28. %endif
  29. Source1: https://bitbucket.org/libkkc/libkkc-data/downloads/%{name}-data-%{dataver}.tar.xz
  30. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
  31. %if "%{?_dist_release}" == "vl6"
  32. BuildRequires: libgee-devel
  33. %else
  34. BuildRequires: libgee06-devel
  35. %endif
  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}-%{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. %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. # for libkkc-data
  85. tar xf %{SOURCE1}
  86. %build
  87. %if %{from_git}
  88. ./autogen.sh
  89. %endif
  90. %configure --enable-shared \
  91. --disable-silent-rules \
  92. %if %{with_vala}
  93. --enable-vala=yes \
  94. %else
  95. --enable-vala=no \
  96. %endif
  97. %__make
  98. # for libkkc-data
  99. pushd %{name}-data-%{dataver}
  100. %configure
  101. %__make
  102. popd
  103. %install
  104. %__rm -rf $RPM_BUILD_ROOT
  105. %makeinstall
  106. # for libkkc-data
  107. pushd %{name}-data-%{dataver}
  108. %makeinstall
  109. popd
  110. %find_lang %{name}
  111. # remove files
  112. %__rm -f $RPM_BUILD_ROOT%{_libdir}/libkkc.la
  113. %clean
  114. %__rm -rf $RPM_BUILD_ROOT
  115. %post -p /sbin/ldconfig
  116. %postun -p /sbin/ldconfig
  117. %files -f %{name}.lang
  118. %defattr(-,root,root,-)
  119. %doc README ChangeLog COPYING AUTHORS NEWS
  120. %doc data/rules/README.rules
  121. %{_libdir}/libkkc.so.*
  122. %{_libdir}/girepository-1.0/Kkc-1.0.typelib
  123. %dir %{_datadir}/libkkc
  124. %{_datadir}/libkkc/rules
  125. %files devel
  126. %defattr(-,root,root,-)
  127. %doc COPYING AUTHORS
  128. %dir %{_includedir}/libkkc
  129. %{_includedir}/libkkc/libkkc.h
  130. %{_libdir}/libkkc.so
  131. %{_libdir}/pkgconfig/kkc-1.0.pc
  132. %{_datadir}/gir-1.0/Kkc-1.0.gir
  133. %{_datadir}/vala/vapi/kkc-1.0.deps
  134. %{_datadir}/vala/vapi/kkc-1.0.vapi
  135. %files tools
  136. %defattr(-,root,root,-)
  137. %doc COPYING AUTHORS
  138. %{_bindir}/kkc
  139. %{_bindir}/kkc-package-data
  140. %files common
  141. %defattr(-,root,root,-)
  142. %doc COPYING AUTHORS
  143. %dir %{_datadir}/libkkc
  144. %dir %{_datadir}/libkkc/templates
  145. %{_datadir}/libkkc/templates/libkkc-data
  146. %files data
  147. %defattr(-,root,root,-)
  148. %doc COPYING AUTHORS
  149. %dir %{_libdir}/libkkc
  150. %dir %{_libdir}/libkkc/models
  151. %{_libdir}/libkkc/models/sorted3
  152. %changelog
  153. * Sat Jul 27 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 0.2.6-1
  154. - update to libkkc 0.2.6
  155. - update to libkkc 0.2.5
  156. * Tue Jun 18 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 0.2.4-1
  157. - update to libkkc 0.2.4
  158. - update to libkkc-data 0.2.0
  159. - add Version tag for libkkc-data sub package
  160. * Tue Mar 26 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.10-1
  161. - update to libkkc 0.1.10
  162. * Sat Mar 16 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.9-1
  163. - update to libkkc 0.1.9
  164. * Sun Mar 3 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.8-1
  165. - update to libkkc 0.1.8
  166. * Sat Feb 23 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.7-1
  167. - update to libkkc 0.1.7
  168. * Fri Feb 15 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.6-1
  169. - update to libkkc 0.1.6
  170. - update to libkkc-data 0.1.6
  171. * Mon Feb 11 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.5-1
  172. - update to libkkc 0.1.5
  173. * Fri Feb 8 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.3-1
  174. - update to 0.1.3
  175. - update License value: GPLv3 -> GPLv3+
  176. - add BuildRequires: marisa-trie-python for libkkc-data
  177. - sync upstream spec: http://ueno.fedorapeople.org/libkkc/libkkc.spec 0.1.3-2
  178. - create tools sub package
  179. - move %%{_bindir}/kkc
  180. - add %%{_bindir}/kkc-package-data
  181. - create common sub package
  182. - add template for generating libkkc-data
  183. - merge libkkc-data SRPM file
  184. - add libkkc-data source file (Source1)
  185. - create data sub package
  186. - add '--disable-silent-rules' option for configure
  187. - add Requires libkkc-data and libkkc-common
  188. - add document: data/rules/README.rules
  189. * Wed Feb 6 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.2-1
  190. - update to 0.1.2
  191. * Tue Feb 5 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.1-1
  192. - update to 0.1.1
  193. * Fri Feb 1 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.0-1
  194. - update to 0.1.0
  195. - rename libkkc.pc to kkc-1.0.pc by upstream
  196. * Fri Feb 1 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-3.gitccfd5c6d
  197. - update to git ccfd5c6d9f913e0a413fe5d0c45bb70032382f68
  198. - add post and postun script
  199. - add translate file
  200. * Tue Jan 29 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-2
  201. - support Vine Linux 6
  202. - without Vala
  203. - BR: libgee-devel
  204. * Mon Jan 28 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-1
  205. - initial build for Vine Linux