RPM: kmymoney: switch to cmake build

Signed-off-by: François Andriot <albator78@libertysurf.fr>
pull/158/head
François Andriot 3 years ago
parent 9c922b15bd
commit f3bd364055

@ -68,7 +68,7 @@ BuildRequires: trinity-tdelibs-devel >= %{tde_version}
BuildRequires: trinity-tdebase-devel >= %{tde_version} BuildRequires: trinity-tdebase-devel >= %{tde_version}
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: autoconf automake libtool m4 BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: libtool BuildRequires: libtool
@ -84,6 +84,7 @@ BuildRequires: update-desktop-files
BuildRequires: brp-check-trinity BuildRequires: brp-check-trinity
%endif %endif
BuildRequires: html2ps
BuildRequires: recode BuildRequires: recode
BuildRequires: libofx-devel BuildRequires: libofx-devel
@ -148,17 +149,17 @@ have '%{name}' package installed, you will hardly find this package useful.
%{tde_datadir}/apps/kmymoney2/ %{tde_datadir}/apps/kmymoney2/
%{tde_datadir}/config.kcfg/kmymoney2.kcfg %{tde_datadir}/config.kcfg/kmymoney2.kcfg
%{tde_datadir}/icons/hicolor/*/*/*.png %{tde_datadir}/icons/hicolor/*/*/*.png
%dir %{tde_datadir}/icons/Tango/ #%dir %{tde_datadir}/icons/Tango/
%dir %{tde_datadir}/icons/Tango/*/ #%dir %{tde_datadir}/icons/Tango/*/
%dir %{tde_datadir}/icons/Tango/*/*/ #%dir %{tde_datadir}/icons/Tango/*/*/
%{tde_datadir}/icons/Tango/*/*/*.png #%{tde_datadir}/icons/Tango/*/*/*.png
%{tde_datadir}/icons/Tango/scalable/*.svgz #%{tde_datadir}/icons/Tango/scalable/*.svgz
%{tde_datadir}/icons/locolor/*/*/*.png %{tde_datadir}/icons/locolor/*/*/*.png
%dir %{tde_datadir}/icons/oxygen/ #%dir %{tde_datadir}/icons/oxygen/
%dir %{tde_datadir}/icons/oxygen/*/ #%dir %{tde_datadir}/icons/oxygen/*/
%dir %{tde_datadir}/icons/oxygen/*/*/ #%dir %{tde_datadir}/icons/oxygen/*/*/
%{tde_datadir}/icons/oxygen/*/*/*.png #%{tde_datadir}/icons/oxygen/*/*/*.png
%{tde_datadir}/icons/oxygen/scalable/*.svgz #%{tde_datadir}/icons/oxygen/scalable/*.svgz
%{tde_tdedocdir}/HTML/en/kmymoney2/ %{tde_tdedocdir}/HTML/en/kmymoney2/
%{tde_mandir}/man1/kmymoney2.* %{tde_mandir}/man1/kmymoney2.*
%{tde_datadir}/apps/kmm_ofximport/ %{tde_datadir}/apps/kmm_ofximport/
@ -181,6 +182,7 @@ This package contains development files needed for KMyMoney plugins.
%{tde_libdir}/libkmm_mymoney.la %{tde_libdir}/libkmm_mymoney.la
%{tde_libdir}/libkmm_plugin.la %{tde_libdir}/libkmm_plugin.la
%{tde_libdir}/*.so %{tde_libdir}/*.so
%{_libdir}/tqt3/plugins/designer/libkmymoney.la
%{_libdir}/tqt3/plugins/designer/libkmymoney.so %{_libdir}/tqt3/plugins/designer/libkmymoney.so
########## ##########
@ -197,54 +199,48 @@ This package contains development files needed for KMyMoney plugins.
%__install -m644 %{SOURCE1} kmymoney2/widgets/ %__install -m644 %{SOURCE1} kmymoney2/widgets/
%__cp "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
%__cp "/usr/share/libtool/"*"/ltmain.sh" "admin/ltmain.sh" || %__cp "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh"
%__make -f "admin/Makefile.common"
%build %build
unset QTDIR QTINC QTLIB unset QTDIR QTLIB QTINC
export PATH="%{tde_bindir}:${PATH}" export PATH="%{tde_bindir}:${PATH}"
export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig:${PKG_CONFIG_PATH}"
%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
LDFLAGS="-Wl,--allow-shlib-undefined"
%endif
# Warning: --enable-final causes FTBFS if ! rpm -E %%cmake|grep -q "cd build"; then
%configure \ %__mkdir_p build
--prefix=%{tde_prefix} \ cd build
--exec-prefix=%{tde_prefix} \ fi
--bindir=%{tde_bindir} \
--datadir=%{tde_datadir} \ %cmake \
--libdir=%{tde_libdir} \ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
--mandir=%{tde_mandir} \ -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
--includedir=%{tde_tdeincludedir} \ -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
-DCMAKE_SKIP_RPATH=OFF \
-DCMAKE_SKIP_INSTALL_RPATH=OFF \
-DCMAKE_INSTALL_RPATH="%{tde_libdir}" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWITH_GCC_VISIBILITY=OFF \
\
-DCMAKE_INSTALL_PREFIX="%{tde_prefix}" \
-DBIN_INSTALL_DIR="%{tde_bindir}" \
-DDOC_INSTALL_DIR="%{tde_docdir}" \
-DINCLUDE_INSTALL_DIR="%{tde_tdeincludedir}" \
-DLIB_INSTALL_DIR="%{tde_libdir}" \
-DPKGCONFIG_INSTALL_DIR="%{tde_libdir}/pkgconfig" \
-DSYSCONF_INSTALL_DIR="%{_sysconfdir}/trinity" \
-DSHARE_INSTALL_PREFIX="%{tde_datadir}" \
\ \
--disable-dependency-tracking \ -DWITH_ALL_OPTIONS=ON \
--disable-debug \
--enable-new-ldflags \
--disable-final \
--enable-closure \
--enable-rpath \
--disable-gcc-hidden-visibility \
\ \
--with-qmake=%{_bindir}/tqmake \ -DBUILD_ALL=ON \
--with-qt-dir=%{_libdir}/tqt3 \
\ \
--disable-pdf-docs \ ..
--enable-ofxplugin \
--enable-ofxbanking \
--enable-qtdesigner \
--disable-sqlite3
%__make %{?_smp_mflags} %__make %{?_smp_mflags} || %__make
%install %install
export PATH="%{tde_bindir}:${PATH}" export PATH="%{tde_bindir}:${PATH}"
%__rm -rf %{buildroot} %__rm -rf %{buildroot}
%__make install DESTDIR=%{buildroot} %__make install DESTDIR=%{buildroot} -C build
%find_lang kmymoney2 %find_lang kmymoney2

Loading…
Cancel
Save