-
Notifications
You must be signed in to change notification settings - Fork 4
/
libyui-gtk-pkg.spec
148 lines (112 loc) · 3.66 KB
/
libyui-gtk-pkg.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#
# spec file for package libyui-gtk-pkg
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: libyui-gtk-pkg
Version: 2.43.4
Release: 0
Source: %{name}-%{version}.tar.bz2
%define so_version 7
%define bin_name %{name}%{so_version}
BuildRequires: boost-devel
BuildRequires: cmake >= 2.8
BuildRequires: gcc-c++
BuildRequires: gtk3-devel
BuildRequires: libyui-devel >= 3.0.4
BuildRequires: pkg-config
%define libyui_gtk_devel_version libyui-gtk-devel >= 2.42.0
BuildRequires: %{libyui_gtk_devel_version}
%define libzypp_devel_version libzypp-devel >= 13.0.0
BuildRequires: %{libzypp_devel_version}
Url: http://github.com/libyui/
Summary: Libyui - Gtk Package Selector
License: LGPL-2.1 or LGPL-3.0
Group: System/Libraries
%description
This package contains the Gtk package selector
component for libYUI.
%package -n %{bin_name}
Requires: libyui%{so_version}
Provides: %{name} = %{version}
Provides: yast2-gtk-pkg = %{version}
Obsoletes: yast2-gtk-pkg < %{version}
Provides: libyui_pkg
Supplements: packageand(libyui-gtk:yast2-packager)
Url: http://github.com/libyui/
Summary: Libyui - Gtk Package Selector
Group: System/Libraries
%description -n %{bin_name}
This package contains the Gtk package selector
component for libYUI.
%package devel
Requires: boost-devel
Requires: glibc-devel
Requires: libstdc++-devel
Requires: %{bin_name} = %{version}
Url: http://github.com/libyui/
Summary: Libyui-gtk-pkg header files
Group: Development/Languages/C and C++
%description devel
This package contains the Gtk package selector
component for libYUI.
This can be used independently of YaST for generic (C++) applications.
This package has very few dependencies.
%prep
%setup -q -n %{name}-%{version}
%build
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
./bootstrap.sh %{_prefix}
mkdir build
cd build
%if %{?_with_debug:1}%{!?_with_debug:0}
cmake .. \
-DPREFIX=%{_prefix} \
-DDOC_DIR=%{_docdir} \
-DLIB_DIR=%{_lib} \
-DCMAKE_BUILD_TYPE=RELWITHDEBINFO \
-DENABLE_WERROR=OFF
%else
cmake .. \
-DPREFIX=%{_prefix} \
-DDOC_DIR=%{_docdir} \
-DLIB_DIR=%{_lib} \
-DCMAKE_BUILD_TYPE=RELEASE \
-DENABLE_WERROR=OFF
%endif
make %{?jobs:-j%jobs}
%install
cd build
make install DESTDIR="$RPM_BUILD_ROOT"
install -m0755 -d $RPM_BUILD_ROOT/%{_docdir}/%{bin_name}/
install -m0755 -d $RPM_BUILD_ROOT/%{_libdir}/yui
install -m0644 ../COPYING* $RPM_BUILD_ROOT/%{_docdir}/%{bin_name}/
%clean
rm -rf "$RPM_BUILD_ROOT"
%post -n %{bin_name} -p /sbin/ldconfig
%postun -n %{bin_name} -p /sbin/ldconfig
%files -n %{bin_name}
%defattr(-,root,root)
%dir %{_libdir}/yui
%{_libdir}/yui/lib*.so.*
%doc %dir %{_docdir}/%{bin_name}
%doc %{_docdir}/%{bin_name}/COPYING*
%files devel
%defattr(-,root,root)
%dir %{_docdir}/%{bin_name}
%{_libdir}/yui/lib*.so
%{_prefix}/include/yui
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/cmake/%{name}
%changelog