libkkc-vl.spec 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. %define ver 0.2.4
  2. %define rel 1
  3. %define dataver 0.2.0
  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. * Tue Jun 18 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 0.2.4-1
  154. - update to libkkc 0.2.4
  155. - update to libkkc-data 0.2.0
  156. - add Version tag for libkkc-data sub package
  157. * Tue Mar 26 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.10-1
  158. - update to libkkc 0.1.10
  159. * Sat Mar 16 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.9-1
  160. - update to libkkc 0.1.9
  161. * Sun Mar 3 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.8-1
  162. - update to libkkc 0.1.8
  163. * Sat Feb 23 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.7-1
  164. - update to libkkc 0.1.7
  165. * Fri Feb 15 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.6-1
  166. - update to libkkc 0.1.6
  167. - update to libkkc-data 0.1.6
  168. * Mon Feb 11 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.5-1
  169. - update to libkkc 0.1.5
  170. * Fri Feb 8 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.3-1
  171. - update to 0.1.3
  172. - update License value: GPLv3 -> GPLv3+
  173. - add BuildRequires: marisa-trie-python for libkkc-data
  174. - sync upstream spec: http://ueno.fedorapeople.org/libkkc/libkkc.spec 0.1.3-2
  175. - create tools sub package
  176. - move %%{_bindir}/kkc
  177. - add %%{_bindir}/kkc-package-data
  178. - create common sub package
  179. - add template for generating libkkc-data
  180. - merge libkkc-data SRPM file
  181. - add libkkc-data source file (Source1)
  182. - create data sub package
  183. - add '--disable-silent-rules' option for configure
  184. - add Requires libkkc-data and libkkc-common
  185. - add document: data/rules/README.rules
  186. * Wed Feb 6 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.2-1
  187. - update to 0.1.2
  188. * Tue Feb 5 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.1-1
  189. - update to 0.1.1
  190. * Fri Feb 1 2013 IWAI, Masaharu <iwai@alib.jp> 0.1.0-1
  191. - update to 0.1.0
  192. - rename libkkc.pc to kkc-1.0.pc by upstream
  193. * Fri Feb 1 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-3.gitccfd5c6d
  194. - update to git ccfd5c6d9f913e0a413fe5d0c45bb70032382f68
  195. - add post and postun script
  196. - add translate file
  197. * Tue Jan 29 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-2
  198. - support Vine Linux 6
  199. - without Vala
  200. - BR: libgee-devel
  201. * Mon Jan 28 2013 IWAI, Masaharu <iwai@alib.jp> 0.0.3-1
  202. - initial build for Vine Linux