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

Loading…
Cancel
Save