This commit is contained in:
parent
9b1b1254bc
commit
df8c3db374
@ -1,2 +1 @@
|
||||
libdbusmenu-qt2
|
||||
libdbusmenu-qt5-2
|
@ -15,15 +15,16 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%define rname libdbusmenu-qt
|
||||
|
||||
Name: libdbusmenu-qt
|
||||
Name: libdbusmenu-qt5
|
||||
Version: 0.9.2+13.10.20130826
|
||||
Release: 0
|
||||
Url: https://launchpad.net/libdbusmenu-qt/
|
||||
Summary: A Qt implementation of the DBusMenu protocol
|
||||
License: LGPL-2.0+
|
||||
Group: System/Libraries
|
||||
Source0: https://launchpad.net/ubuntu/trusty/+source/%{name}/%{version}-0ubuntu1/+files/%{name}_%{version}.orig.tar.gz
|
||||
Source0: https://launchpad.net/ubuntu/trusty/+source/%{rname}/%{version}-0ubuntu1/+files/%{rname}_%{version}.orig.tar.gz
|
||||
Source99: baselibs.conf
|
||||
# PATCH-FIX-UPSTREAM noqDebug-qWarnings.patch -- libdbusmenu uses it's own qDebug's and qWarnings,
|
||||
# which are useless, and annoy users, so this patch just disables them in release mode
|
||||
@ -33,40 +34,15 @@ BuildRequires: cmake >= 2.8.6
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libqjson-devel
|
||||
BuildRequires: libqt4-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: pkgconfig(Qt5Core)
|
||||
Provides: dbusmenu-qt = 0.3.3
|
||||
Obsoletes: dbusmenu-qt < 0.3.3
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRoot: %{_tmppath}/%{rname}-%{version}-build
|
||||
|
||||
%description
|
||||
This library provides a Qt implementation of the DBusMenu protocol.
|
||||
|
||||
The DBusMenu protocol makes it possible for applications to export and import
|
||||
their menus over DBus.
|
||||
|
||||
%package devel
|
||||
Summary: Development package for libdbusmenu-qt
|
||||
Group: Development/Libraries/Other
|
||||
Requires: libdbusmenu-qt2 = %{version}
|
||||
Provides: dbusmenu-qt-devel = 0.3.3
|
||||
Obsoletes: dbusmenu-qt-devel < 0.3.3
|
||||
|
||||
%description devel
|
||||
This package contains development files for libdbusmenu-qt.
|
||||
|
||||
%package -n libdbusmenu-qt2
|
||||
Summary: Development package for dbusmenu-qt
|
||||
Group: System/Libraries
|
||||
%requires_ge libqt4-x11
|
||||
|
||||
%description -n libdbusmenu-qt2
|
||||
This library provides a Qt implementation of the DBusMenu protocol.
|
||||
|
||||
The DBusMenu protocol makes it possible for applications to export and import
|
||||
their menus over DBus. Qt4 library
|
||||
their menus over DBus. Qt5 library
|
||||
|
||||
%package -n libdbusmenu-qt5-2
|
||||
Summary: Development package for dbusmenu-qt5
|
||||
@ -88,27 +64,15 @@ Requires: pkgconfig(Qt5Core)
|
||||
This package contains development files for libdbusmenu-qt5.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -n %{rname}-%{version}
|
||||
%patch1 -p1
|
||||
|
||||
# Remove build time references so build-compare can do its work
|
||||
sed -i "s/HTML_TIMESTAMP = YES/HTML_TIMESTAMP = NO/" Doxyfile.in
|
||||
|
||||
%build
|
||||
mkdir build-qt4
|
||||
pushd build-qt4
|
||||
export CFLAGS="%{optflags} -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT"
|
||||
export CXXFLAGS="%{optflags} -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT"
|
||||
export LDFLAGS="-Wl,-Bsymbolic-functions $LDFLAGS"
|
||||
_libsuffix=$(echo %{_lib} | cut -b4-)
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
|
||||
-DLIB_SUFFIX="$_libsuffix" \
|
||||
-DUSE_QT4=ON \
|
||||
-DCMAKE_BUILD_TYPE=release ..
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
popd
|
||||
mkdir build-qt5
|
||||
pushd build-qt5
|
||||
mkdir build
|
||||
pushd build
|
||||
export CFLAGS="%{optflags} -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT"
|
||||
export CXXFLAGS="%{optflags} -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT"
|
||||
export LDFLAGS="-Wl,-Bsymbolic-functions $LDFLAGS"
|
||||
@ -122,37 +86,20 @@ make %{?_smp_mflags} VERBOSE=1
|
||||
popd
|
||||
|
||||
%install
|
||||
pushd build-qt4
|
||||
%makeinstall
|
||||
popd
|
||||
pushd build-qt5
|
||||
%makeinstall
|
||||
popd
|
||||
%makeinstall -C build
|
||||
|
||||
# Install the documentation in the correct location
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}-devel
|
||||
mkdir -p %{buildroot}%{_docdir}/libdbusmenu-qt5-devel
|
||||
mv %{buildroot}%{_datadir}/doc/libdbusmenu-qt-doc/ %{buildroot}%{_docdir}/%{name}-devel/html/
|
||||
mv %{buildroot}%{_datadir}/doc/libdbusmenu-qt5-doc/ %{buildroot}%{_docdir}/libdbusmenu-qt5-devel/html/
|
||||
# Install additional documentation
|
||||
install -pm 0644 COPYING NEWS README %{buildroot}%{_docdir}/%{name}-devel/
|
||||
install -pm 0644 COPYING NEWS README %{buildroot}%{_docdir}/libdbusmenu-qt5-devel/
|
||||
|
||||
%fdupes -s %{buildroot}%{_docdir}/%{name}-devel/
|
||||
%fdupes -s %{buildroot}%{_docdir}/libdbusmenu-qt5-devel/
|
||||
|
||||
%post -n libdbusmenu-qt2 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libdbusmenu-qt2 -p /sbin/ldconfig
|
||||
|
||||
%post -n libdbusmenu-qt5-2 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libdbusmenu-qt5-2 -p /sbin/ldconfig
|
||||
|
||||
%files -n libdbusmenu-qt2
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libdbusmenu-qt.so.2*
|
||||
|
||||
%files -n libdbusmenu-qt5-2
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libdbusmenu-qt5.so.2*
|
||||
@ -164,11 +111,4 @@ install -pm 0644 COPYING NEWS README %{buildroot}%{_docdir}/libdbusmenu-qt5-deve
|
||||
%{_includedir}/dbusmenu-qt5/
|
||||
%{_libdir}/pkgconfig/dbusmenu-qt5.pc
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{_docdir}/%{name}-devel/
|
||||
%{_libdir}/libdbusmenu-qt.so
|
||||
%{_includedir}/dbusmenu-qt/
|
||||
%{_libdir}/pkgconfig/dbusmenu-qt.pc
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user