Fri, 11 Mar 2011 21:30:26 +0100
Import package vendor original specs for necessary manipulations.
michael@0 | 1 | Name: libmpeg2 |
michael@0 | 2 | Version: 0.5.1 |
michael@0 | 3 | Release: 9%{?dist} |
michael@0 | 4 | Summary: MPEG-2 decoder libraries |
michael@0 | 5 | |
michael@0 | 6 | Group: System Environment/Libraries |
michael@0 | 7 | License: GPLv2+ |
michael@0 | 8 | URL: http://libmpeg2.sourceforge.net/ |
michael@0 | 9 | Source0: http://libmpeg2.sourceforge.net/files/libmpeg2-%{version}.tar.gz |
michael@0 | 10 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
michael@0 | 11 | |
michael@0 | 12 | BuildRequires: SDL-devel |
michael@0 | 13 | BuildRequires: libXt-devel |
michael@0 | 14 | BuildRequires: libXv-devel |
michael@0 | 15 | |
michael@0 | 16 | |
michael@0 | 17 | %description |
michael@0 | 18 | libmpeg2 is a free library for decoding mpeg-2 and mpeg-1 video |
michael@0 | 19 | streams. It is released under the terms of the GPL license. |
michael@0 | 20 | |
michael@0 | 21 | %package -n mpeg2dec |
michael@0 | 22 | Summary: MPEG-2 decoder program |
michael@0 | 23 | Group: Applications/Multimedia |
michael@0 | 24 | Requires: %{name} = %{version}-%{release} |
michael@0 | 25 | |
michael@0 | 26 | %description -n mpeg2dec |
michael@0 | 27 | The %{name}-devel package contains libraries and header files for |
michael@0 | 28 | developing applications that use %{name}. |
michael@0 | 29 | |
michael@0 | 30 | %package devel |
michael@0 | 31 | Summary: Development files for %{name} |
michael@0 | 32 | Group: Development/Libraries |
michael@0 | 33 | Requires: %{name} = %{version}-%{release} |
michael@0 | 34 | Requires: pkgconfig |
michael@0 | 35 | # Introducted in F-10 Can be dropped in F-12 |
michael@0 | 36 | Provides: mpeg2dec-devel = %{version}-%{release} |
michael@0 | 37 | Obsoletes: mpeg2dec-devel < %{version} |
michael@0 | 38 | |
michael@0 | 39 | %description devel |
michael@0 | 40 | The %{name}-devel package contains libraries and header files for |
michael@0 | 41 | developing applications that use %{name}. |
michael@0 | 42 | |
michael@0 | 43 | |
michael@0 | 44 | %prep |
michael@0 | 45 | %setup -q |
michael@0 | 46 | iconv -f ISO-8859-1 -t UTF-8 AUTHORS > AUTHORS.tmp |
michael@0 | 47 | touch -r AUTHORS AUTHORS.tmp |
michael@0 | 48 | cp -p -f AUTHORS.tmp AUTHORS |
michael@0 | 49 | rm AUTHORS.tmp |
michael@0 | 50 | |
michael@0 | 51 | #Disable ppc altivec case |
michael@0 | 52 | sed -i -e 's/ppc-/noppc64-/' configure.ac configure |
michael@0 | 53 | sed -i -e 's/powerpc-/nopowerpc64-/' configure.ac configure |
michael@0 | 54 | |
michael@0 | 55 | %build |
michael@0 | 56 | %configure --disable-static \ |
michael@0 | 57 | %ifarch %{ix86} ppc |
michael@0 | 58 | --disable-accel-detect \ |
michael@0 | 59 | %endif |
michael@0 | 60 | |
michael@0 | 61 | # mpeg2dec have rpath |
michael@0 | 62 | # remove rpath from libtool |
michael@0 | 63 | sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
michael@0 | 64 | sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
michael@0 | 65 | |
michael@0 | 66 | make %{?_smp_mflags} \ |
michael@0 | 67 | %ifarch %{ix86} |
michael@0 | 68 | OPT_CFLAGS="-fPIC -DPIC" \ |
michael@0 | 69 | %else |
michael@0 | 70 | OPT_CFLAGS="" \ |
michael@0 | 71 | %endif |
michael@0 | 72 | |
michael@0 | 73 | |
michael@0 | 74 | %install |
michael@0 | 75 | rm -rf $RPM_BUILD_ROOT |
michael@0 | 76 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" |
michael@0 | 77 | find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' |
michael@0 | 78 | |
michael@0 | 79 | |
michael@0 | 80 | #Fix datatype internal definitions |
michael@0 | 81 | install -pm 0644 libmpeg2/mpeg2_internal.h \ |
michael@0 | 82 | $RPM_BUILD_ROOT%{_includedir}/mpeg2dec/ |
michael@0 | 83 | |
michael@0 | 84 | |
michael@0 | 85 | |
michael@0 | 86 | %clean |
michael@0 | 87 | rm -rf $RPM_BUILD_ROOT |
michael@0 | 88 | |
michael@0 | 89 | |
michael@0 | 90 | %post -p /sbin/ldconfig |
michael@0 | 91 | |
michael@0 | 92 | %postun -p /sbin/ldconfig |
michael@0 | 93 | |
michael@0 | 94 | |
michael@0 | 95 | %files |
michael@0 | 96 | %defattr(-,root,root,-) |
michael@0 | 97 | %doc AUTHORS ChangeLog COPYING NEWS README TODO |
michael@0 | 98 | %{_libdir}/*.so.* |
michael@0 | 99 | |
michael@0 | 100 | %files -n mpeg2dec |
michael@0 | 101 | %defattr(-,root,root,-) |
michael@0 | 102 | %{_bindir}/corrupt_mpeg2 |
michael@0 | 103 | %{_bindir}/extract_mpeg2 |
michael@0 | 104 | %{_bindir}/mpeg2dec |
michael@0 | 105 | %{_mandir}/man1/*.1* |
michael@0 | 106 | |
michael@0 | 107 | %files devel |
michael@0 | 108 | %defattr(-,root,root,-) |
michael@0 | 109 | %doc CodingStyle doc/libmpeg2.txt doc/sample*.c |
michael@0 | 110 | %{_includedir}/mpeg2dec/ |
michael@0 | 111 | %{_libdir}/*.so |
michael@0 | 112 | %{_libdir}/pkgconfig/libmpeg2.pc |
michael@0 | 113 | %{_libdir}/pkgconfig/libmpeg2convert.pc |
michael@0 | 114 | |
michael@0 | 115 | |
michael@0 | 116 | %changelog |
michael@0 | 117 | * Mon Nov 1 2010 Kozinov Ivan <kozinov@gmail.com> - 0.5.1-9 |
michael@0 | 118 | - Build for MeeGo 1.1 |
michael@0 | 119 | |
michael@0 | 120 | * Sat Oct 17 2009 kwizart < kwizart at gmail.com > - 0.5.1-8 |
michael@0 | 121 | - Rebuild for F-12 |
michael@0 | 122 | |
michael@0 | 123 | * Wed Apr 8 2009 kwizart < kwizart at gmail.com > - 0.5.1-7 |
michael@0 | 124 | - New attempt |
michael@0 | 125 | |
michael@0 | 126 | * Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 0.5.1-6 |
michael@0 | 127 | - rebuild for new F11 features |
michael@0 | 128 | |
michael@0 | 129 | * Fri Mar 27 2009 kwizart < kwizart at gmail.com > - 0.5.1-5 |
michael@0 | 130 | - Rebuild |
michael@0 | 131 | - Fix target_arch conditionals |
michael@0 | 132 | - Provides internal definitions mpeg2_internal.h |
michael@0 | 133 | - Disable ppc altivec optim (TODO improve asm optim later) |
michael@0 | 134 | |
michael@0 | 135 | * Fri Oct 4 2008 kwizart < kwizart at gmail.com > - 0.5.1-3 |
michael@0 | 136 | - Fix CFLAGS on x86 producing selinux denials. |
michael@0 | 137 | |
michael@0 | 138 | * Wed Jul 30 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 0.5.1-2 |
michael@0 | 139 | - rebuild for buildsys cflags issue |
michael@0 | 140 | |
michael@0 | 141 | * Fri Jul 18 2008 kwizart < kwizart at gmail.com > - 0.5.1-1 |
michael@0 | 142 | - Update to 0.5.1 |
michael@0 | 143 | |
michael@0 | 144 | * Tue Jul 15 2008 kwizart < kwizart at gmail.com > - 0.5.0-1 |
michael@0 | 145 | - Initial package (based on mpeg2dec) |
michael@0 | 146 |