Hrvoje Senjan 2013-11-25 20:54:08 +00:00 committed by Git OBS Bridge
parent 9b1b1254bc
commit df8c3db374
3 changed files with 9 additions and 70 deletions

View File

@ -1,2 +1 @@
libdbusmenu-qt2
libdbusmenu-qt5-2 libdbusmenu-qt5-2

View File

@ -15,15 +15,16 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # 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 Version: 0.9.2+13.10.20130826
Release: 0 Release: 0
Url: https://launchpad.net/libdbusmenu-qt/ Url: https://launchpad.net/libdbusmenu-qt/
Summary: A Qt implementation of the DBusMenu protocol Summary: A Qt implementation of the DBusMenu protocol
License: LGPL-2.0+ License: LGPL-2.0+
Group: System/Libraries 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 Source99: baselibs.conf
# PATCH-FIX-UPSTREAM noqDebug-qWarnings.patch -- libdbusmenu uses it's own qDebug's and qWarnings, # 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 # 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: doxygen
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libqjson-devel
BuildRequires: libqt4-devel
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Core)
Provides: dbusmenu-qt = 0.3.3 BuildRoot: %{_tmppath}/%{rname}-%{version}-build
Obsoletes: dbusmenu-qt < 0.3.3
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
This library provides a Qt implementation of the DBusMenu protocol. This library provides a Qt implementation of the DBusMenu protocol.
The DBusMenu protocol makes it possible for applications to export and import The DBusMenu protocol makes it possible for applications to export and import
their menus over DBus. their menus over DBus. Qt5 library
%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
%package -n libdbusmenu-qt5-2 %package -n libdbusmenu-qt5-2
Summary: Development package for dbusmenu-qt5 Summary: Development package for dbusmenu-qt5
@ -88,27 +64,15 @@ Requires: pkgconfig(Qt5Core)
This package contains development files for libdbusmenu-qt5. This package contains development files for libdbusmenu-qt5.
%prep %prep
%setup -q %setup -q -n %{rname}-%{version}
%patch1 -p1 %patch1 -p1
# Remove build time references so build-compare can do its work # Remove build time references so build-compare can do its work
sed -i "s/HTML_TIMESTAMP = YES/HTML_TIMESTAMP = NO/" Doxyfile.in sed -i "s/HTML_TIMESTAMP = YES/HTML_TIMESTAMP = NO/" Doxyfile.in
%build %build
mkdir build-qt4 mkdir build
pushd build-qt4 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"
_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
export CFLAGS="%{optflags} -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT" 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 CXXFLAGS="%{optflags} -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT"
export LDFLAGS="-Wl,-Bsymbolic-functions $LDFLAGS" export LDFLAGS="-Wl,-Bsymbolic-functions $LDFLAGS"
@ -122,37 +86,20 @@ make %{?_smp_mflags} VERBOSE=1
popd popd
%install %install
pushd build-qt4 %makeinstall -C build
%makeinstall
popd
pushd build-qt5
%makeinstall
popd
# Install the documentation in the correct location # Install the documentation in the correct location
mkdir -p %{buildroot}%{_docdir}/%{name}-devel
mkdir -p %{buildroot}%{_docdir}/libdbusmenu-qt5-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/ mv %{buildroot}%{_datadir}/doc/libdbusmenu-qt5-doc/ %{buildroot}%{_docdir}/libdbusmenu-qt5-devel/html/
# Install additional documentation # Install additional documentation
install -pm 0644 COPYING NEWS README %{buildroot}%{_docdir}/%{name}-devel/
install -pm 0644 COPYING NEWS README %{buildroot}%{_docdir}/libdbusmenu-qt5-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/ %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 %post -n libdbusmenu-qt5-2 -p /sbin/ldconfig
%postun -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 %files -n libdbusmenu-qt5-2
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/libdbusmenu-qt5.so.2* %{_libdir}/libdbusmenu-qt5.so.2*
@ -164,11 +111,4 @@ install -pm 0644 COPYING NEWS README %{buildroot}%{_docdir}/libdbusmenu-qt5-deve
%{_includedir}/dbusmenu-qt5/ %{_includedir}/dbusmenu-qt5/
%{_libdir}/pkgconfig/dbusmenu-qt5.pc %{_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 %changelog