kconfig/kconfig.spec

135 lines
4.5 KiB
RPMSpec

%define majver %(echo %version | cut -d. -f1-2)
Name: kconfig
Version: 5.6.0
Release: 1mamba
Summary: KDE Frameworks advanced configuration system
Group: Graphical Desktop/Applications/Configuration
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.kde.org
Source: ftp://ftp.kde.org/pub/kde/stable/frameworks/%{majver}/kconfig-%{version}.tar.xz
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libqt5-devel
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
BuildRequires: automoc4
BuildRequires: cmake
BuildRequires: extra-cmake-modules
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
KConfig provides an advanced configuration system. It is made of two parts:
KConfigCore and KConfigGui.
KConfigCore provides access to the configuration files themselves. It features:
- Code generation: describe your configuration in an XML file, and use `kconfig_compiler to generate classes that read and write configuration entries.
- Cascading configuration files (global settings overridden by local settings).
- Optional shell expansion support
- The ability to lock down configuration options
KConfigGui provides a way to hook widgets to the configuration so that they are automatically initialized from the configuration and automatically propagate their changes to their respective configuration files.
## remove the devel blocks if this package does not provide development stuff
%package devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: kdelibs-devel
%description devel
This package contains libraries and header files for developing applications that use %{name}.
%debug_package
%prep
%setup -q
%build
%cmake -d build \
-DCMAKE_BUILD_TYPE=Release \
-DLIB_INSTALL_DIR=%{_lib} \
-DLIBEXEC_INSTALL_DIR=%{_lib} \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DBUILD_TESTING=OFF
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
%find_lang kconfig5_qt --all-name --with-kde || touch %{name}.lang
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
## remove the following line if this package has no hicolor icons
touch --no-create %{_kde4_icondir}/hicolor >/dev/null 2>&1
## remove the following line if this package has no oxygen icons
touch --no-create %{_kde4_icondir}/oxygen >/dev/null 2>&1
exit 0
%posttrans
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
update-desktop-database -q >/dev/null 2>&1
update-mime-database %{_kde4_mimedir} >/dev/null 2>&1
## remove the following line if this package has no hicolor icons
gtk-update-icon-cache %{_kde4_icondir}/hicolor >/dev/null 2>&1
## remove the following line if this package has no oxygen icons
gtk-update-icon-cache %{_kde4_icondir}/oxygen >/dev/null 2>&1
exit 0
%postun
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
if [ $1 -eq 0 ]; then
update-desktop-database -q >/dev/null 2>&1
update-mime-database %{_kde4_mimedir} >/dev/null 2>&1
## remove the following two lines if this package has no hicolor icons
touch --no-create %{_kde4_icondir}/hicolor >/dev/null 2>&1
gtk-update-icon-cache %{_kde4_icondir}/hicolor >/dev/null 2>&1
## remove the following two lines if this package has no oxygen icons
touch --no-create %{_kde4_icondir}/oxygen >/dev/null 2>&1
gtk-update-icon-cache %{_kde4_icondir}/oxygen >/dev/null 2>&1
fi
exit 0
%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/kconfig_compiler_kf5
%{_bindir}/kreadconfig5
%{_bindir}/kwriteconfig5
%{_libdir}/libKF5ConfigCore.so.*
%{_libdir}/libKF5ConfigGui.so.*
%{_datadir}/locale/*/LC_MESSAGES/kconfig5_qt.qm
%doc COPYING.LIB
%files devel
%defattr(-,root,root)
%dir %{_includedir}/KF5/KConfigCore/
%{_includedir}/KF5/KConfigCore/*
%dir %{_includedir}/KF5/KConfigGui
%{_includedir}/KF5/KConfigGui/*
%{_includedir}/KF5/kconfig_version.h
%dir %{_libdir}/cmake/KF5Config
%{_libdir}/cmake/KF5Config/KF5Config*.cmake
%{_libdir}/kf5/kconf_update
%{_libdir}/libKF5ConfigCore.so
%{_libdir}/libKF5ConfigGui.so
%{_libdir}/qt5/mkspecs/modules/qt_KConfigCore.pri
%{_libdir}/qt5/mkspecs/modules/qt_KConfigGui.pri
%changelog
* Fri Feb 06 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 5.6.0-1mamba
- package created using the webbuild interface