libkkc-vl.spec 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. %define ver 0.1.10
  2. %define rel 1
  3. %define dataver 0.1.6
  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 = %{version}-%{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. %description data
  75. The %{name}-data package contains the language model data that %{name}
  76. uses at run time.
  77. %prep
  78. %if %{from_git}
  79. %setup -q -n %{name}-%{githash}
  80. %else
  81. %setup -q
  82. %endif
  83. # for libkkc-data
  84. tar xf %{SOURCE1}
  85. %build
  86. %if %{from_git}
  87. ./autogen.sh
  88. %endif
  89. %configure --enable-shared \
  90. --disable-silent-rules \
  91. %if %{with_vala}
  92. --enable-vala=yes \
  93. %else
  94. --enable-vala=no \
  95. %endif
  96. %__make
  97. # for libkkc-data
  98. pushd %{name}-data-%{dataver}
  99. %configure
  100. %__make
  101. popd
  102. %install
  103. %__rm -rf $RPM_BUILD_ROOT
  104. %makeinstall
  105. # for libkkc-data
  106. pushd %{name}-data-%{dataver}
  107. %makeinstall
  108. popd
  109. %find_lang %{name}
  110. # remove files
  111. %__rm -f $RPM_BUILD_ROOT%{_libdir}/libkkc.la
  112. %clean
  113. %__rm -rf $RPM_BUILD_ROOT
  114. %post -p /sbin/ldconfig
  115. %postun -p /sbin/ldconfig
  116. %files -f %{name}.lang
  117. %defattr(-,root,root,-)
  118. %doc README ChangeLog COPYING AUTHORS NEWS
  119. %doc data/rules/README.rules
  120. %{_libdir}/libkkc.so.*
  121. %{_libdir}/girepository-1.0/Kkc-1.0.typelib
  122. %dir %{_datadir}/libkkc
  123. %{_datadir}/libkkc/rules
  124. %files devel
  125. %defattr(-,root,root,-)
  126. %doc COPYING AUTHORS
  127. %dir %{_includedir}/libkkc
  128. %{_includedir}/libkkc/libkkc.h
  129. %{_libdir}/libkkc.so
  130. %{_libdir}/pkgconfig/kkc-1.0.pc
  131. %{_datadir}/gir-1.0/Kkc-1.0.gir
  132. %{_datadir}/vala/vapi/kkc-1.0.deps
  133. %{_datadir}/vala/vapi/kkc-1.0.vapi
  134. %files tools
  135. %defattr(-,root,root,-)
  136. %doc COPYING AUTHORS
  137. %{_bindir}/kkc
  138. %{_bindir}/kkc-package-data
  139. %files common
  140. %defattr(-,root,root,-)
  141. %doc COPYING AUTHORS
  142. %dir %{_datadir}/libkkc
  143. %dir %{_datadir}/libkkc/templates
  144. %{_datadir}/libkkc/templates/libkkc-data
  145. %files data
  146. %defattr(-,root,root,-)
  147. %doc COPYING AUTHORS
  148. %dir %{_libdir}/libkkc
  149. %dir %{_libdir}/libkkc/models
  150. %{_libdir}/libkkc/models/sorted3
  151. %changelog
  152. * Tue Mar 26 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.10-1
  153. - update to libkkc 0.1.10
  154. * Sat Mar 16 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.9-1
  155. - update to libkkc 0.1.9
  156. * Sun Mar 3 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.8-1
  157. - update to libkkc 0.1.8
  158. * Sat Feb 23 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.7-1
  159. - update to libkkc 0.1.7
  160. * Fri Feb 15 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.6-1
  161. - update to libkkc 0.1.6
  162. - update to libkkc-data 0.1.6
  163. * Mon Feb 11 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.5-1
  164. - update to libkkc 0.1.5
  165. * Fri Feb 8 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.3-1
  166. - update to 0.1.3
  167. - update License value: GPLv3 -> GPLv3+
  168. - add BuildRequires: marisa-trie-python for libkkc-data
  169. - sync upstream spec: http://ueno.fedorapeople.org/libkkc/libkkc.spec 0.1.3-2
  170. - create tools sub package
  171. - move %%{_bindir}/kkc
  172. - add %%{_bindir}/kkc-package-data
  173. - create common sub package
  174. - add template for generating libkkc-data
  175. - merge libkkc-data SRPM file
  176. - add libkkc-data source file (Source1)
  177. - create data sub package
  178. - add '--disable-silent-rules' option for configure
  179. - add Requires libkkc-data and libkkc-common
  180. - add document: data/rules/README.rules
  181. * Wed Feb 6 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.2-1
  182. - update to 0.1.2
  183. * Tue Feb 5 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.1-1
  184. - update to 0.1.1
  185. * Fri Feb 1 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.0-1
  186. - update to 0.1.0
  187. - rename libkkc.pc to kkc-1.0.pc by upstream
  188. * Fri Feb 1 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-3.gitccfd5c6d
  189. - update to git ccfd5c6d9f913e0a413fe5d0c45bb70032382f68
  190. - add post and postun script
  191. - add translate file
  192. * Tue Jan 29 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-2
  193. - support Vine Linux 6
  194. - without Vala
  195. - BR: libgee-devel
  196. * Mon Jan 28 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-1
  197. - initial build for Vine Linux