libzypp-vl.spec 9.4 KB

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