RPM packaging: switch tdemultimedia to cmake

pull/3/head
François Andriot 8 years ago
parent 2e4da17243
commit f3bc4668b4

@ -71,7 +71,7 @@ BuildRequires: trinity-arts-devel >= %{tde_epoch}:1.5.10
BuildRequires: trinity-tdelibs-devel >= %{tde_version}
BuildRequires: trinity-tdebase-devel >= %{tde_version}
BuildRequires: autoconf automake libtool m4
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: fdupes
BuildRequires: desktop-file-utils
@ -777,7 +777,7 @@ This is the arts (TDE Sound daemon) plugin.
%files -n trinity-libarts-mpeglib
%defattr(-,root,root,-)
%{tde_bindir}/mpeglibartsplay
%{tde_libdir}/libarts_mpeglib-0.3.0.so.*
%{tde_libdir}/libarts_mpeglib-0.3.0.so*
%{tde_libdir}/libarts_mpeglib.la
%{tde_libdir}/libarts_splay.so.*
%{tde_libdir}/libarts_splay.la
@ -1034,10 +1034,6 @@ noatun plugins.
%prep
%setup -q -n %{name}-%{version}%{?preversion:~%{preversion}}
%__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"
# Update icons for some control center modules
%__sed -i "tdeioslave/audiocd/kcmaudiocd/audiocd.desktop" -e "s|^Icon=.*|Icon=kcmaudio|"
@ -1047,52 +1043,55 @@ unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}"
export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig:${PKG_CONFIG_PATH}"
# Warning: GCC visibility causes FTBFS [Bug #1285]
%configure \
--prefix=%{tde_prefix} \
--exec-prefix=%{tde_prefix} \
--bindir=%{tde_bindir} \
--libdir=%{tde_libdir} \
--includedir=%{tde_tdeincludedir} \
--datadir=%{tde_datadir} \
\
--disable-dependency-tracking \
--disable-debug \
--enable-new-ldflags \
--enable-final \
--enable-closure \
--enable-rpath \
--disable-gcc-hidden-visibility \
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} -DNDEBUG" \
-DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS} -DNDEBUG" \
-DCMAKE_SKIP_RPATH=OFF \
-DCMAKE_INSTALL_RPATH="%{tde_libdir}" \
-DCMAKE_NO_BUILTIN_CHRPATH=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWITH_GCC_VISIBILITY=ON \
\
--with-extra-includes="%{_includedir}/cdda:%{_includedir}/cddb:%{tde_tdeincludedir}/arts:%{tde_includedir}/artsc" \
-DCMAKE_INSTALL_PREFIX="%{tde_prefix}" \
-DBIN_INSTALL_DIR="%{tde_bindir}" \
-DCONFIG_INSTALL_DIR="%{tde_confdir}" \
-DDOC_INSTALL_DIR="%{tde_docdir}" \
-DINCLUDE_INSTALL_DIR="%{tde_tdeincludedir}" \
-DLIB_INSTALL_DIR="%{tde_libdir}" \
-DPKGCONFIG_INSTALL_DIR="%{tde_libdir}/pkgconfig" \
-DSHARE_INSTALL_PREFIX="%{tde_datadir}" \
\
--with-vorbis \
--without-ossaudio \
--with-alsa \
--with-cdparanoia \
%{?with_lame:--with-lame} %{!?with_lame:--without-lame} \
%{?with_taglib:--with-taglib} %{!?with_taglib:--without-taglib} \
%{?with_akode:--with-akode} %{!?with_akode:--without-akode} \
--with-audiofile \
%{?with_musicbrainz:--with-musicbrainz} %{!?with_musicbrainz:--without-musicbrainz} \
--with-gstreamer \
--with-kscd-cdda \
--with-theora \
--with-flac \
%{?with_xine:--with-xine} %{!?with_xine:--without-xine}
# Fix unexplained "undefined reference to `__stack_chk_fail'"
%if 0%{?mgaversion} >= 4 || 0%{?pclinuxos}
%__sed -i "noatun/app/Makefile" -e "/^libtdeinit_noatun_la_LDFLAGS/ s/$/ -Wl,-lc/"
%endif
%__make %{?_smp_mflags} || %__make
-DWITH_ALL_OPTIONS=ON \
-DWITH_ALSA=ON \
-DWITH_ARTS_AKODE=ON \
-DWITH_ARTS_AUDIOFILE=ON \
-DWITH_ARTS_MPEGLIB=ON \
-DWITH_ARTS_XINE=ON \
-DWITH_CDPARANOIA=ON \
-DWITH_FLAC=ON \
-DWITH_GSTREAMER=ON \
-DWITH_KSCD_CDDA=ON \
-DWITH_LAME=%{?with_lame:ON}%{!?with_lame:OFF} \
-DWITH_MUSICBRAINZ=%{?with_musicbrainz:ON}%{!?with_musicbrainz:OFF} \
-DWITH_TAGLIB=%{?with_taglib:ON}%{!?with_taglib:OFF} \
-DWITH_THEORA=ON \
-DWITH_VORBIS=ON \
-DBUILD_ALL=ON \
..
%__make %{?_smp_mflags}
%install
export PATH="%{tde_bindir}:${PATH}"
%__rm -rf %{?buildroot}
%__make install DESTDIR=%{buildroot}
%__make install DESTDIR="%{?buildroot}" -C build
# Disable MPEG support entirely
%if 0%{?with_mpeg} == 0

Loading…
Cancel
Save