r8382 | jkupec | 2008-01-29 10:38:37 +0100 (Di, 29 Jan 2008) | 2 lines
[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 sqlite-devel
28 BuildRequires:  boost-devel curl-devel dejagnu doxygen gcc-c++ gettext-devel graphviz hal-devel libxml2-devel rpm-devel
29 BuildRequires:  hicolor-icon-theme update-desktop-files
30 Requires:       gpg2
31 Requires:       satsolver-tools == %( echo `rpm -q --queryformat '%{VERSION}' satsolver-tools`)
32
33 %description
34 Package, Patch, Pattern, and Product Management
35
36 Authors:
37 --------
38     Michael Andres <ma@suse.de>
39     Jiri Srain <jsrain@suse.cz>
40     Stefan Schubert <schubi@suse.de>
41     Duncan Mac-Vicar <dmacvicar@suse.de>
42     Klaus Kaempf <kkaempf@suse.de>
43     Marius Tomaschewski <mt@suse.de>
44     Stanislav Visnovsky <visnov@suse.cz>
45     Ladislav Slezak <lslezak@suse.cz>
46
47 %package devel
48 Requires:       libzypp == @VERSION@
49 Requires:       libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel
50 Requires:       bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel
51 Requires:       cmake
52 Summary:        Package, Patch, Pattern, and Product Management - developers files
53 Group:          System/Packages
54 Provides:       yast2-packagemanager-devel
55 Obsoletes:      yast2-packagemanager-devel
56
57 %description -n libzypp-devel
58 Package, Patch, Pattern, and Product Management - developers files
59
60 Authors:
61 --------
62     Michael Andres <ma@suse.de>
63     Jiri Srain <jsrain@suse.cz>
64     Stefan Schubert <schubi@suse.de>
65     Duncan Mac-Vicar <dmacvicar@suse.de>
66     Klaus Kaempf <kkaempf@suse.de>
67     Marius Tomaschewski <mt@suse.de>
68     Stanislav Visnovsky <visnov@suse.cz>
69     Ladislav Slezak <lslezak@suse.cz>
70
71 %prep
72 %setup -q
73
74 %build
75 mkdir build
76 cd build
77 cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
78       -DLIB=%{_lib} \
79       -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
80       -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
81       -DCMAKE_BUILD_TYPE=Release \
82       -DCMAKE_SKIP_RPATH=1 \
83       ..
84 make %{?jobs:-j %jobs} VERBOSE=1
85 make -C doc/autodoc %{?jobs:-j %jobs}
86 make -C po %{?jobs:-j %jobs} translations
87
88 #make check
89
90 %install
91 cd build
92 make install DESTDIR=$RPM_BUILD_ROOT
93 make -C doc/autodoc install DESTDIR=$RPM_BUILD_ROOT
94 mkdir -p $RPM_BUILD_ROOT/etc/zypp/repos.d
95 %suse_update_desktop_file -G "" -C "" package-manager
96 make -C po install DESTDIR=$RPM_BUILD_ROOT
97 # Create filelist with translations
98 cd ..
99 %{find_lang} zypp
100
101
102 %post
103 %run_ldconfig
104 #%{prefix}/lib/zypp/zypp-migrate-sources
105
106 %postun
107 %run_ldconfig
108
109 %clean
110
111 %files -f zypp.lang
112 %defattr(-,root,root)
113 %dir               /etc/zypp
114 %dir               /etc/zypp/repos.d
115 %config(noreplace) /etc/zypp/zypp.conf
116 #%{prefix}/lib/zypp
117 %{prefix}/share/zypp
118 %{prefix}/share/applications/package-manager.desktop
119 %{prefix}/share/icons/hicolor/scalable/apps/package-manager-icon.svg
120 %{prefix}/share/icons/hicolor/16x16/apps/package-manager-icon.png
121 %{prefix}/share/icons/hicolor/32x32/apps/package-manager-icon.png
122 %{prefix}/share/icons/hicolor/48x48/apps/package-manager-icon.png
123 %{prefix}/bin/package-manager
124 %{prefix}/bin/package-manager-su
125 %{_libdir}/libzypp*so.*
126
127 %files devel
128 %defattr(-,root,root)
129 %{_libdir}/libzypp.so
130 #%dir %{_libdir}/libzypp.la
131 %{_docdir}/%{name}
132 %dir %{prefix}/include/zypp
133 %{prefix}/include/zypp/*
134 %{prefix}/share/cmake/Modules/*
135 %{_libdir}/pkgconfig/libzypp.pc
136
137 %changelog