summaryrefslogtreecommitdiffstats
path: root/redhat/applications/kaffeine-mozilla
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2021-11-01 10:17:39 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2021-11-01 21:47:22 +0100
commit0f2429f7c604fd8e195b484d1e5d033d33b9701e (patch)
treec938c46131a72ba4fbf858943d7bbd5c911f7cf2 /redhat/applications/kaffeine-mozilla
parent09634c7b95dbbbc08df61dce162d80b1cb109aa6 (diff)
downloadtde-packaging-0f2429f7c604fd8e195b484d1e5d033d33b9701e.tar.gz
tde-packaging-0f2429f7c604fd8e195b484d1e5d033d33b9701e.zip
RPM: switch kaffeine-mozilla to cmake build
Signed-off-by: François Andriot <albator78@libertysurf.fr>
Diffstat (limited to 'redhat/applications/kaffeine-mozilla')
-rw-r--r--redhat/applications/kaffeine-mozilla/kaffeine-mozilla.spec45
1 files changed, 29 insertions, 16 deletions
diff --git a/redhat/applications/kaffeine-mozilla/kaffeine-mozilla.spec b/redhat/applications/kaffeine-mozilla/kaffeine-mozilla.spec
index 93b467c17..5e59a6c49 100644
--- a/redhat/applications/kaffeine-mozilla/kaffeine-mozilla.spec
+++ b/redhat/applications/kaffeine-mozilla/kaffeine-mozilla.spec
@@ -59,7 +59,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
-BuildRequires: autoconf automake libtool m4
+BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: libtool
@@ -98,33 +98,46 @@ when a page containing a supported media format is loaded.
%prep
%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
unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}"
-%configure \
- --prefix=%{_libdir}/mozilla \
+if [ -d "%{_includedir}/nspr4" ]; then
+ 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
export PATH="%{tde_bindir}:${PATH}"
%__rm -rf %{buildroot}
-%__make install DESTDIR=%{buildroot}
+%__make install DESTDIR=%{buildroot} -C build
# Remove useless filess
%__rm -f %{?buildroot}%{_libdir}/mozilla/plugins/kaffeineplugin.a