RPM: switch kaffeine-mozilla to cmake build

Signed-off-by: François Andriot <albator78@libertysurf.fr>
pull/111/head
François Andriot 3 years ago
parent f62192502d
commit b127899b03

@ -59,7 +59,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
BuildRequires: autoconf automake libtool m4 BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: libtool BuildRequires: libtool
@ -98,33 +98,46 @@ when a page containing a supported media format is loaded.
%prep %prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}} %setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
%__cp "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
%__cp "/usr/share/libtool/"*"/ltmain.sh" "ltmain.sh" || %__cp "/usr/share/libtool/ltmain.sh" "ltmain.sh"
%__make -f "admin/Makefile.common"
%build %build
unset QTDIR QTINC QTLIB unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}" export PATH="%{tde_bindir}:${PATH}"
%configure \ if [ -d "%{_includedir}/nspr4" ]; then
--prefix=%{_libdir}/mozilla \ RPM_OPT_FLAGS="-I%{_includedir}/nspr4 ${RPM_OPT_FLAGS}"
fi
if ! rpm -E %%cmake|grep -q "cd build"; then
%__mkdir_p build
cd build
fi
%cmake \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
-DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
-DCMAKE_SKIP_RPATH=OFF \
-DCMAKE_INSTALL_RPATH="%{tde_libdir}" \
-DCMAKE_NO_BUILTIN_CHRPATH=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_PROGRAM_PATH="%{tde_bindir}" \
-DWITH_GCC_VISIBILITY=ON \
\
-DCMAKE_INSTALL_PREFIX=%{tde_prefix} \
-DBIN_INSTALL_DIR=%{tde_bindir} \
-DCONFIG_INSTALL_DIR="%{tde_confdir}" \
-DINCLUDE_INSTALL_DIR=%{tde_tdeincludedir} \
-DSHARE_INSTALL_PREFIX=%{tde_datadir} \
\ \
--disable-dependency-tracking \ ..
--disable-debug \
--enable-new-ldflags \
--enable-final \
--enable-closure \
--enable-rpath \
--disable-gcc-hidden-visibility
%__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
# Remove useless filess # Remove useless filess
%__rm -f %{?buildroot}%{_libdir}/mozilla/plugins/kaffeineplugin.a %__rm -f %{?buildroot}%{_libdir}/mozilla/plugins/kaffeineplugin.a

Loading…
Cancel
Save