%define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %define python_sitelib64 %(python_64 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") Name: libkate Version: 0.4.1 Release: 2 Summary: Libraries to handle the Kate bitstream format Group: System Environment/Libraries License: BSD URL: http://code.google.com/p/libkate/ Source0: http://libkate.googlecode.com/files/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python-devel >= 2.7.13-1 BuildRequires: libogg-devel >= 1.3.2-1 BuildRequires: liboggz >= 1.1.1-1 BuildRequires: libpng-devel >= 1.6.28-1 BuildRequires: bison BuildRequires: flex BuildRequires: doxygen BuildRequires: make %define _libdir64 %{_prefix}/lib64 %description This is libkate, the reference implementation of a codec for the Kate bitstream format. Kate is a karaoke and text codec meant for encapsulation in an Ogg container. It can carry text, images, and animate them. Kate is meant to be used for karaoke alongside audio/video streams (typically Vorbis and Theora), movie subtitles, song lyrics, and anything that needs text data at arbitrary time intervals. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: libogg-devel >= 1.3.2-1 %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package utils Summary: Encoder/Decoder utilities for %{name} Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} Requires: liboggz >= 1.1.1 Requires: libpng >= 1.6.28-1 %description utils The %{name}-utils package contains the katedec/kateenc binaries for %{name}. %package docs Summary: Documentation for %{name} Group: Documentation %description docs The %{name}-docs package contains the docs for %{name}. %prep %setup -q mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="cc_r -qcpluscmt" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static gmake %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install mv ${RPM_BUILD_ROOT}%{_libdir}/python2.7 ${RPM_BUILD_ROOT}%{_libdir64}/ ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/%{name}.so* /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/liboggkate.a ${RPM_BUILD_ROOT}%{_libdir64}/liboggkate.so* ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc %{_datadir}/doc/%{name}/[A-Z]* %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %doc 32bit/examples/ %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc /usr/include/* /usr/lib/*.la /usr/lib64/*.la %files utils %defattr(-,root,system,-) %{_bindir}/* %{_mandir}/man1/* %{python_sitelib}/* %{python_sitelib64}/* /usr/bin/* %files docs %defattr(-,root,system,-) %doc %{_datadir}/doc/%{name}/html %changelog * Mon Jan 16 2017 Michael Perzl - 0.4.1-2 - recompiled against latest versions * Mon Aug 22 2011 Michael Perzl - 0.4.1-1 - updated to version 0.4.1 * Mon Dec 06 2010 Michael Perzl - 0.3.8-1 - first version for AIX V5.1 and higher