libzypp-vl.spec 8.7 KB

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