libzypp-vl.spec 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. #
  2. # spec file for package libzypp
  3. #
  4. # Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
  5. #
  6. # All modifications and additions to the file contributed by third parties
  7. # remain the property of their copyright owners, unless otherwise agreed
  8. # upon. The license for this file, and modifications and additions to the
  9. # file, is the same license as for the pristine package itself (unless the
  10. # license for the pristine package is not an Open Source License, in which
  11. # case the license is the MIT License). An "Open Source License" is a
  12. # license that conforms to the Open Source Definition (Version 1.9)
  13. # published by the Open Source Initiative.
  14. # Please submit bugfixes or comments via http://bugs.opensuse.org/
  15. #
  16. %define _unpackaged_files_terminate_build 1
  17. Name: libzypp
  18. Version: 17.31.23
  19. Release: 1%{?_dist_release}
  20. Summary: Package, Patch, Pattern, and Product Management
  21. Group: system
  22. Vendor: Project Vine
  23. Distribution: Vine Linux
  24. License: GPL-2.0+
  25. Url: https://github.com/openSUSE/libzypp
  26. BuildRoot: %{_tmppath}/%{name}-%{version}-build
  27. Source: https://github.com/openSUSE/libzypp/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
  28. Source1: %{name}-rpmlintrc
  29. Source2: ChangeLog.suse
  30. # Features we provide (update doc/autoinclude/FeatureTest.doc):
  31. Provides: libzypp(plugin) = 0
  32. Provides: libzypp(plugin:appdata) = 0
  33. Provides: libzypp(plugin:commit) = 1
  34. Provides: libzypp(plugin:services) = 0
  35. Provides: libzypp(plugin:system) = 0
  36. Provides: libzypp(plugin:urlresolver) = 0
  37. Provides: libzypp(repovarexpand) = 0
  38. Recommends: logrotate
  39. # lsof is used for 'zypper ps':
  40. Recommends: lsof
  41. BuildRequires: cmake
  42. BuildRequires: openssl-devel
  43. BuildRequires: libudev-devel
  44. BuildRequires: libboost-devel
  45. BuildRequires: libboost-program-options
  46. BuildRequires: libboost-thread
  47. BuildRequires: libboost-test
  48. BuildRequires: dejagnu
  49. BuildRequires: doxygen
  50. BuildRequires: gcc-c++
  51. BuildRequires: gettext-devel
  52. BuildRequires: graphviz
  53. BuildRequires: asciidoctor
  54. #BuildRequires: graphviz-gnome
  55. BuildRequires: libxml2-devel
  56. BuildRequires: libproxy-devel
  57. BuildRequires: gpgme-devel
  58. BuildRequires: pkgconfig(sigc++-2.0)
  59. BuildRequires: glib2-devel
  60. BuildRequires: yaml-cpp-devel
  61. BuildConflicts: yaml-cpp-static
  62. BuildRequires: protobuf-devel
  63. BuildRequires: protobuf-lite-devel
  64. BuildRequires: readline-devel
  65. BuildRequires: pkgconfig
  66. BuildRequires: libsolv-devel >= 0.6.7
  67. Requires: libsolv-tools
  68. # required for testsuite, webrick
  69. BuildRequires: ruby
  70. BuildRequires: expat-devel
  71. Requires: rpm
  72. BuildRequires: popt-devel
  73. BuildRequires: rpm-devel
  74. Requires: gnupg2
  75. %define min_curl_version 7.19.4
  76. BuildRequires: curl-devel >= %{min_curl_version}
  77. Requires: curl >= %{min_curl_version}
  78. %description
  79. Package, Patch, Pattern, and Product Management
  80. %package devel
  81. Summary: Package, Patch, Pattern, and Product Management - developers files
  82. Group: programming
  83. Requires: libboost-devel
  84. Requires: bzip2
  85. Requires: glibc-devel
  86. Requires: libstdc++-devel
  87. Requires: libxml2-devel
  88. Requires: libzypp = %{version}
  89. Requires: openssl-devel
  90. Requires: popt-devel
  91. Requires: rpm-devel
  92. Requires: zlib-devel
  93. Requires: libzstd-devel
  94. Requires: libudev-devel
  95. Requires: cmake
  96. Requires: curl-devel >= %{min_curl_version}
  97. Requires: libsolv-devel
  98. %description devel
  99. Package, Patch, Pattern, and Product Management - developers files
  100. %debug_package
  101. %prep
  102. %setup -q
  103. %build
  104. unset TRANSLATION_SET
  105. unset EXTRA_CMAKE_OPTIONS
  106. export YAML_CPP_LIBRARIES=-lyaml-cpp \
  107. %cmake \
  108. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
  109. -DDOC_INSTALL_DIR=%{_docdir} \
  110. -DLIB=%{_lib} \
  111. -DCMAKE_BUILD_TYPE=Release \
  112. -DCMAKE_SKIP_RPATH=1 \
  113. -DUSE_TRANSLATION_SET=${TRANSLATION_SET:-zypp} \
  114. -DENABLE_ZSTD_COMPRESSION=ON \
  115. -DDISABLE_MEDIABACKEND_TESTS=ON \
  116. -DDISABLE_AUTODOCS=ON \
  117. ${EXTRA_CMAKE_OPTIONS}
  118. %cmake_build
  119. #make -C doc/autodoc %{?_smp_mflags}
  120. %make_build -C %{_vpath_builddir}/po
  121. %install
  122. rm -rf "$RPM_BUILD_ROOT"
  123. %cmake_install
  124. %if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
  125. ln -s %{_sysconfdir}/yum.repos.d $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d
  126. %else
  127. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d
  128. %endif
  129. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/services.d
  130. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/vendors.d
  131. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/multiversion.d
  132. mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp
  133. mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins
  134. mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins/appdata
  135. mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins/commit
  136. mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins/services
  137. mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins/system
  138. mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins/urlresolver
  139. mkdir -p $RPM_BUILD_ROOT%{_var}/lib/zypp
  140. mkdir -p $RPM_BUILD_ROOT%{_var}/log/zypp
  141. mkdir -p $RPM_BUILD_ROOT%{_var}/cache/zypp
  142. %make_install -C %{_vpath_builddir}/po
  143. # Create filelist with translations
  144. %{find_lang} zypp
  145. %post
  146. if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi
  147. # convert old lock file to new
  148. # TODO make this a separate file?
  149. # TODO run the sript only when updating form pre-11.0 libzypp versions
  150. LOCKSFILE=%{_sysconfdir}/zypp/locks
  151. OLDLOCKSFILE=%{_sysconfdir}/zypp/locks.old
  152. is_old(){
  153. # if no such file, exit with false (1 in bash)
  154. test -f ${LOCKSFILE} || return 1
  155. TEMP_FILE=`mktemp`
  156. cat ${LOCKSFILE} | sed '/^\#.*/ d;/.*:.*/d;/^[^[a-zA-Z\*?.0-9]*$/d' > ${TEMP_FILE}
  157. if [ -s ${TEMP_FILE} ]
  158. then
  159. RES=0
  160. else
  161. RES=1
  162. fi
  163. rm -f ${TEMP_FILE}
  164. return ${RES}
  165. }
  166. append_new_lock(){
  167. case "$#" in
  168. 1 )
  169. echo "
  170. solvable_name: $1
  171. match_type: glob
  172. " >> ${LOCKSFILE}
  173. ;;
  174. 2 ) #TODO version
  175. echo "
  176. solvable_name: $1
  177. match_type: glob
  178. version: $2
  179. " >> ${LOCKSFILE}
  180. ;;
  181. 3 ) #TODO version
  182. echo "
  183. solvable_name: $1
  184. match_type: glob
  185. version: $2 $3
  186. " >> ${LOCKSFILE}
  187. ;;
  188. esac
  189. }
  190. die() {
  191. echo $1
  192. exit 1
  193. }
  194. if is_old ${LOCKSFILE}
  195. then
  196. mv -f ${LOCKSFILE} ${OLDLOCKSFILE} || die "cannot backup old locks"
  197. cat ${OLDLOCKSFILE}| sed "/^\#.*/d"| while read line
  198. do
  199. append_new_lock $line
  200. done
  201. fi
  202. %clean
  203. rm -rf "$RPM_BUILD_ROOT"
  204. %files -f zypp.lang
  205. %defattr(-,root,root)
  206. %dir %{_sysconfdir}/zypp
  207. %if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
  208. %{_sysconfdir}/zypp/repos.d
  209. %else
  210. %dir %{_sysconfdir}/zypp/repos.d
  211. %endif
  212. %dir %{_sysconfdir}/zypp/services.d
  213. %dir %{_sysconfdir}/zypp/vendors.d
  214. %dir %{_sysconfdir}/zypp/multiversion.d
  215. %config(noreplace) %{_sysconfdir}/zypp/zypp.conf
  216. %config(noreplace) %{_sysconfdir}/zypp/systemCheck
  217. %config(noreplace) %{_sysconfdir}/zypp/needreboot
  218. %config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr
  219. %dir %{_var}/lib/zypp
  220. %dir %{_var}/log/zypp
  221. %dir %{_var}/cache/zypp
  222. %{_prefix}/lib/zypp
  223. %{_datadir}/zypp
  224. %{_bindir}/*
  225. %{_libdir}/libzypp*so.*
  226. %{_libdir}/libzypp-tui.so
  227. %{_libexecdir}/zypp/zypp-rpm
  228. %doc %{_mandir}/man1/*.1.*
  229. %doc %{_mandir}/man5/*.5.*
  230. %files devel
  231. %defattr(-,root,root)
  232. %license COPYING
  233. %{_libdir}/libzypp.so
  234. %{_includedir}/zypp*
  235. %{_datadir}/cmake/Modules/*
  236. %{_libdir}/pkgconfig/libzypp.pc
  237. %changelog
  238. * Wed Nov 01 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.31.23-1
  239. - new upstream release.
  240. * Fri Oct 13 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.31.21-1
  241. - new upstream release.
  242. * Fri Oct 28 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.31.4-1
  243. - new upstream release.
  244. * Tue Oct 19 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.28.6-1
  245. - new upstream release.
  246. - built with openssl-3.0.0.
  247. * Thu Sep 09 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.28.3-1
  248. - new upstream release.
  249. - dropped ldconfig scriptlets.
  250. * Mon Feb 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.25.7-2
  251. - rebuilt with rpm-4.16.
  252. * Sat Feb 20 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.25.7-1
  253. - new upstream release.
  254. - built with boost-1.75.0.
  255. * Sat Apr 25 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.23.4-1
  256. - new upstream release.
  257. - built with boost-1.72.0.
  258. * Wed Mar 25 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.23.2-1
  259. - new upstream release.
  260. * Tue Sep 03 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.14.0-1
  261. - new upstream release.
  262. * Mon Nov 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 17.8.1-1
  263. - new upstream release.
  264. * Tue Jan 09 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 16.17.7-2
  265. - rebuilt with libproxy-0.4.15.
  266. * Wed Jan 03 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 16.17.7-1
  267. - new upstream release.
  268. * Sun Jul 17 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.22.2-1
  269. - new upstream release.
  270. * Sun May 8 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.22.0-1
  271. - new upstream release.
  272. * Sun Nov 15 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 15.19.6-1
  273. - initial build for Vine Linux.
  274. - new upstream release.