-
Notifications
You must be signed in to change notification settings - Fork 22
/
libyui-qt-graph.spec
133 lines (103 loc) · 3.5 KB
/
libyui-qt-graph.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
#
# spec file for package libyui-qt-graph
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: libyui-qt-graph
# DO NOT manually bump the version here; instead, use rake version:bump
Version: 4.2.14
Release: 0
%define so_version 15
%define bin_name %{name}%{so_version}
BuildRequires: cmake >= 3.10
BuildRequires: gcc-c++
BuildRequires: graphviz-devel >= 2.26.0
# Used here and in src/CMakeLists.txt
BuildRequires: libyui-devel >= %{version}
BuildRequires: libyui-qt-devel >= %{version}
BuildRequires: pkg-config
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5X11Extras)
Summary: Libyui - Qt Graph Widget
License: LGPL-2.1-only OR LGPL-3.0-only
URL: http://github.com/libyui/
Source: libyui-%{version}.tar.bz2
%description
This package contains the Qt graph component for libyui.
%package -n %{bin_name}
Summary: Libyui - Qt graph widget
Requires: libyui%{so_version}
Requires: libyui-qt%{so_version}
Supplements: libyui-qt%{so_version}
Provides: %{name} = %{version}
Provides: yast2-qt-graph = 2.46.0
Obsoletes: yast2-qt-graph < 2.46.0
# Force removal of old -doc packages (bsc#1184363)
Obsoletes: %{name}-doc < %{version}
%description -n %{bin_name}
This package contains the Qt graph component for libyui.
This is a special widget to visualize graphs such as the
storage device hierarchy (disks, partitions, subvolumes
etc.). and similar graphviz-generated graphs.
%package devel
Summary: Libyui - Header files for the Qt graph widget
Requires: %{bin_name} = %{version}
Requires: libyui-qt-devel >= %{version}
%description devel
This package contains the header files for the Qt graph component
for libyui.
%prep
%setup -q -n libyui-%{version}
%build
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
pushd %{name}
mkdir build
cd build
%if %{?_with_debug:1}%{!?_with_debug:0}
CMAKE_OPTS="-DCMAKE_BUILD_TYPE=RELWITHDEBINFO"
%else
CMAKE_OPTS="-DCMAKE_BUILD_TYPE=RELEASE"
%endif
cmake .. \
-DBUILD_EXAMPLES=on \
$CMAKE_OPTS
make %{?jobs:-j%jobs}
popd
%install
pushd %{name}
cd build
make install DESTDIR="$RPM_BUILD_ROOT"
install -m0755 -d $RPM_BUILD_ROOT/%{_libdir}/yui
install -m0755 -d $RPM_BUILD_ROOT/%{_docdir}/%{bin_name}/
install -m0644 ../../COPYING* $RPM_BUILD_ROOT/%{_docdir}/%{bin_name}/
popd
%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}
%license %{_docdir}/%{bin_name}/COPYING*
%files devel
%defattr(-,root,root)
%{_libdir}/yui/lib*.so
%{_includedir}/yui/qt-graph
%dir %{_docdir}/%{bin_name}
%doc %{_docdir}/%{bin_name}/examples
%changelog