File dtksettings.spec of Package dtksettings
#
# spec file for package dtksettings
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 Hillwood Yang <hillwood@opensuse.org>
#
# 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/
#
%define libver 1
Name: dtksettings
Version: 0.1.7
Release: 0
Summary: Deepin Tool Kit Settings library
License: GPL-3.0+
Group: System/GUI/Other
Url: https://github.com/linuxdeepin/dtksettings
Source: https://github.com/linuxdeepin/dtksettings/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: libqt5-qtdeclarative-devel
BuildRequires: libqt5-qtbase-private-headers-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
DtkSettings is a powerful tool to generation config form json.
%package -n lib%{name}%{libver}
Summary: Deepin Tool Kit Settings library
Group: System/Libraries
%description -n lib%{name}%{libver}
DtkSettings is a powerful tool to generation config form json.
.
This package contains the shared libraries.
%package -n lib%{name}view%{libver}
Summary: Deepin Tool Kit Settings library
Group: System/Libraries
%description -n lib%{name}view%{libver}
DtkSettings is a powerful tool to generation config form json.
.
This package contains the shared libraries.
%package -n lib%{name}-devel
Summary: Deepin Tool Kit Settings library
Requires: lib%{name}%{libver} = %{version}-%{release}
Group: Development/Libraries/C and C++
%description -n lib%{name}-devel
DtkSettings is a powerful tool to generation config form json.
.
This package contains the header files and static libraries of libdtksettings.
%package -n lib%{name}view-devel
Summary: Deepin Tool Kit Settings library
Requires: lib%{name}view%{libver} = %{version}-%{release}
Group: Development/Libraries/C and C++
%description -n lib%{name}view-devel
DtkSettings is a powerful tool to generation config form json.
.
This package contains the header files and static libraries of libdtksettingsview.
%prep
%setup -q
%build
%qmake5 DEFINES+=QT_NO_DEBUG_OUTPUT \
PREFIX=%{_prefix} \
LIB_INSTALL_DIR=%{_libdir}
make %{?_smp_mflags}
%install
%qmake5_install
# Remove RPM macros form pkgconfig files
sed -i 's|-L/home/abuild/rpmbuild/BUILD/dtksettings-%{version}/settingsview/../settings/ ||g' \
%{buildroot}%{_libdir}/pkgconfig/%{name}view.pc
%post -n lib%{name}%{libver} -p /sbin/ldconfig
%postun -n lib%{name}%{libver} -p /sbin/ldconfig
%post -n lib%{name}view%{libver} -p /sbin/ldconfig
%postun -n lib%{name}view%{libver} -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc debian/copyright debian/changelog
%{_bindir}/dtk-settings-tool
%files -n lib%{name}%{libver}
%defattr(-,root,root,-)
%{_libdir}/lib%{name}.so.*
%files -n lib%{name}view%{libver}
%defattr(-,root,root,-)
%{_libdir}/lib%{name}view.so.*
%files -n lib%{name}-devel
%defattr(-,root,root,-)
%{_libdir}/lib%{name}.so
%dir %{_includedir}/libdtk-*
%{_includedir}/libdtk-*/DSettings
%{_libdir}/pkgconfig/%{name}.pc
%files -n lib%{name}view-devel
%defattr(-,root,root,-)
%{_libdir}/lib%{name}view.so
%{_includedir}/libdtk-*/DSettingsView
%{_libdir}/pkgconfig/%{name}view.pc
%changelog