Re: Newbie ?: Building a precompiled binary...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/11/2005 10:57:44 AM, Jonathan Chen wrote:


I believe the %prep or %build part is not needed. But for some reason, I just can't get the rpm to be created.

Here is an example I use to create a divx4linux rpm out of the binary.

%prep is needed to unpack the tarball the binary comes in, %build is not needed - but it needs to be there.


Summary: DivX library for Linux
Name: divx4linux
Version: 5.0.5
Release: 1
License: Free for Personal Use
Group: System Environment/Libraries
URL: http://www.divx.com/divx/linux/
Source0: http://download.divx.com/divx/divx4linux-std-%{tarball_release}.tar.gz
Packager: mpeters@xxxxxxx
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
ExclusiveArch: i386
BuildArch: i686
ExclusiveOS: Linux
NoSource: 0

Requires: compat-libstdc++

%description
The DivX MPEG-4 Codec is a Linux installable driver. In other words, it is
a DLL (dynamic linked library) that can be installed into the Linux system,
and be loaded and called by any Linux applications that need to access the
function of the codec.

The center of DivX MPEG-4 Codec is the DivX codec core. It is the engine of
the codec. The codec core processes either the video image or MPEG-4
bitstream, and it uses the compression and decompression to convert
information between the formats. The codec core includes two parts - an
encoder (that compresses the video image into MPEG-4 bitstreams) and a
decoder (that decompresses the MPEG-4 bitstream back into video images).
The encoder core is named "encore", and the decoder core "decore".

The DivX shared library encapsules the DivX codec core, so the Linux
application can access the codec core through the Linux installable driver
interface. In addition, application can also access the codec core
functionalities by directly call the codec core functions.

%package devel
Summary: Header files for divx4linux
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
Development header files for divx4linux. You only need this package if you
plan to compile software that links against divx4linux.

%prep
%setup -q -n %{name}-%{tarball_release}

%build

%install
rm -rf $RPM_BUILD_ROOT && mkdir -p $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_includedir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}
install -m 0755 libdivxdecore.so $RPM_BUILD_ROOT%{_libdir}/
install -m 0755 libdivxencore.so $RPM_BUILD_ROOT%{_libdir}/
ln -sf %{_libdir}/libdivxdecore.so $RPM_BUILD_ROOT%{_libdir}/libdivxdecore.so.0
ln -sf %{_libdir}/libdivxencore.so $RPM_BUILD_ROOT%{_libdir}/libdivxencore.so.0
install -m644 decore.h $RPM_BUILD_ROOT%{_includedir}/
install -m644 encore2.h $RPM_BUILD_ROOT%{_includedir}/
install -m644 portab.h $RPM_BUILD_ROOT%{_includedir}/

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc *.htm
%_libdir/libdivxencore.*
%_libdir/libdivxdecore.*

%files devel
%defattr(-,root,root,-)
%_includedir/*.h


%changelog
* Fri Nov 12 2004 <mpeters@xxxxxxx>
- stuff

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux