improved output of vendor change solution #362985
[platform/upstream/libzypp.git] / libzypp.spec.cmake
1 #
2 # spec file for package libzypp
3 #
4 # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 # This file and all modifications and additions to the pristine
6 # package are under the same license as the package itself.
7 #
8 # Please submit bugfixes or comments via http://bugs.opensuse.org/
9 #
10
11 # norootforbuild
12
13 Name:           @PACKAGE@
14 License:        GPL v2 or later
15 Group:          System/Packages
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
17 Autoreqprov:    on
18 Summary:        Package, Patch, Pattern, and Product Management
19 Version:        @VERSION@
20 Release:        0
21 Source:         @PACKAGE@-@VERSION@.tar.bz2
22 Source1:        @PACKAGE@-rpmlintrc
23 Prefix:         /usr
24 Provides:       yast2-packagemanager
25 Obsoletes:      yast2-packagemanager
26 BuildRequires:  cmake
27 BuildRequires:  libsatsolver-devel openssl-devel
28 BuildRequires:  boost-devel curl-devel dejagnu doxygen gcc-c++ gettext-devel graphviz hal-devel libxml2-devel rpm-devel
29
30 %if 0%{?suse_version}
31 BuildRequires:  hicolor-icon-theme update-desktop-files
32 %endif
33
34 %if 0%{?mandriva_version}
35 BuildRequires:  sqlite3-devel
36 %else
37 BuildRequires:  sqlite-devel
38 %endif
39
40
41
42 %if 0%{?suse_version}
43 Requires:       gpg2
44 %else
45 Requires:       gnupg
46 %endif
47
48 Requires:       satsolver-tools == %( echo `rpm -q --queryformat '%{VERSION}' satsolver-tools`)
49
50 %description
51 Package, Patch, Pattern, and Product Management
52
53 Authors:
54 --------
55     Michael Andres <ma@suse.de>
56     Jiri Srain <jsrain@suse.cz>
57     Stefan Schubert <schubi@suse.de>
58     Duncan Mac-Vicar <dmacvicar@suse.de>
59     Klaus Kaempf <kkaempf@suse.de>
60     Marius Tomaschewski <mt@suse.de>
61     Stanislav Visnovsky <visnov@suse.cz>
62     Ladislav Slezak <lslezak@suse.cz>
63
64 %package devel
65 Requires:       libzypp == @VERSION@
66 Requires:       libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel
67 Requires:       bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel
68 Requires:       cmake libsatsolver-devel
69 Summary:        Package, Patch, Pattern, and Product Management - developers files
70 Group:          System/Packages
71 Provides:       yast2-packagemanager-devel
72 Obsoletes:      yast2-packagemanager-devel
73
74 %description -n libzypp-devel
75 Package, Patch, Pattern, and Product Management - developers files
76
77 Authors:
78 --------
79     Michael Andres <ma@suse.de>
80     Jiri Srain <jsrain@suse.cz>
81     Stefan Schubert <schubi@suse.de>
82     Duncan Mac-Vicar <dmacvicar@suse.de>
83     Klaus Kaempf <kkaempf@suse.de>
84     Marius Tomaschewski <mt@suse.de>
85     Stanislav Visnovsky <visnov@suse.cz>
86     Ladislav Slezak <lslezak@suse.cz>
87
88 %prep
89 %setup -q
90
91 %build
92 mkdir build
93 cd build
94 cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
95       -DLIB=%{_lib} \
96       -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
97       -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
98       -DCMAKE_BUILD_TYPE=Release \
99       -DCMAKE_SKIP_RPATH=1 \
100       ..
101 make %{?jobs:-j %jobs} VERBOSE=1
102 make -C doc/autodoc %{?jobs:-j %jobs}
103 make -C po %{?jobs:-j %jobs} translations
104
105 #make check
106
107 %install
108 cd build
109 make install DESTDIR=$RPM_BUILD_ROOT
110 make -C doc/autodoc install DESTDIR=$RPM_BUILD_ROOT
111 mkdir -p $RPM_BUILD_ROOT/etc/zypp/repos.d
112 %suse_update_desktop_file -G "" -C "" package-manager
113 make -C po install DESTDIR=$RPM_BUILD_ROOT
114 # Create filelist with translations
115 cd ..
116 %{find_lang} zypp
117
118
119 %post
120 %run_ldconfig
121 if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi
122 #%{prefix}/lib/zypp/zypp-migrate-sources
123
124 %postun
125 %run_ldconfig
126
127 %clean
128
129 %files -f zypp.lang
130 %defattr(-,root,root)
131 %dir               /etc/zypp
132 %dir               /etc/zypp/repos.d
133 %config(noreplace) /etc/zypp/zypp.conf
134 #%{prefix}/lib/zypp
135 %{prefix}/share/zypp
136 %{prefix}/share/applications/package-manager.desktop
137 %{prefix}/share/icons/hicolor/scalable/apps/package-manager-icon.svg
138 %{prefix}/share/icons/hicolor/16x16/apps/package-manager-icon.png
139 %{prefix}/share/icons/hicolor/32x32/apps/package-manager-icon.png
140 %{prefix}/share/icons/hicolor/48x48/apps/package-manager-icon.png
141 %{prefix}/bin/package-manager
142 %{prefix}/bin/package-manager-su
143 %{_libdir}/libzypp*so.*
144
145 %files devel
146 %defattr(-,root,root)
147 %{_libdir}/libzypp.so
148 #%dir %{_libdir}/libzypp.la
149 %{_docdir}/%{name}
150 %dir %{prefix}/include/zypp
151 %{prefix}/include/zypp/*
152 %{prefix}/share/cmake/Modules/*
153 %{_libdir}/pkgconfig/libzypp.pc
154
155 %changelog