A new user interface for you! Read more...

File libQtMof5.spec of Package libQtMof5

#
# spec file for package libQtMof5
#
# Copyright (c) 2012 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:           libQtMof5
Version:	0.89.0+1.0.0.beta1
Release:	0
License:	SUSE-LGPL-2.1-with-nokia-exception-1.1 or GPL-3.0
Summary:	Qt5 MOF (Meta Object Facility) Library
Url:		http://liveblue.wordpress.com
Group:		Development/Libraries/X11
Source:		qtmof-%{version}.tar.gz
BuildRequires:	libQtWrappedObjects-private-headers-devel = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
QtMof is a Qt5-based implementation of OMG's MOF (Meta Object Facility)
specification.

%prep
%setup -q -n qtmof-%{version}

%package -n libQtMof-devel
Summary:	Qt Development Kit
Group:		Development/Libraries/X11
Requires:	%name = %version
Requires:	libQtWrappedObjects-devel
Conflicts:	libqt4-devel

%description -n libQtMof-devel
You need this package, if you want to compile programs with qtmof.

%package -n libQtMof-private-headers-devel
Summary:	Non-ABI stable experimental API
Group:		Development/Libraries/C and C++
Requires:	libQtMof-devel = %version
Requires:	libQtWrappedObjects-private-headers-devel

%description -n libQtMof-private-headers-devel
This package provides private headers of libqt5-qtmof that are normally
not used by application development and that do not have any ABI or
API guarantees. The packages that build against these have to require
the exact Qt version.

%build
qmake -r
cd src/mof/
make %{?_smp_mflags}
cd ../../src/plugins/metamodels/mof/
make %{?_smp_mflags}

%install
cd src/mof/
make INSTALL_ROOT=$RPM_BUILD_ROOT install
cd ../../src/plugins/metamodels/mof/
make INSTALL_ROOT=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT/%_libdir -type f -name '*la' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} \;
find $RPM_BUILD_ROOT/%_libdir -type f -name '*pc' -print -exec perl -pi -e "s, -L$RPM_BUILD_DIR/?\S+,,g" {} \; -exec sed -i -e "s,^moc_location=.*,moc_location=%_bindir/moc," -e "s,uic_location=.*,uic_location=%_bindir/uic," {} \;

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%_libdir/libQt5Mof.so.*
%_libdir/qt5/plugins/metamodels
%_libdir/qt5/plugins/metamodels/libqmofmetamodel.so

%files -n libQtMof-devel
%defattr(-,root,root,755)
%exclude %_includedir/QtMof/5.0.0
%_includedir/QtMof
%_libdir/cmake/Qt5Mof
%_libdir/libQt5Mof.la
%_libdir/libQt5Mof.prl
%_libdir/libQt5Mof.so
%_libdir/pkgconfig/Qt5Mof.pc
%_libdir/qt5/mkspecs/modules/qt_lib_mof.pri

%files -n libQtMof-private-headers-devel
%defattr(-,root,root,755)
%_includedir/QtMof/5.0.0

%changelog