Generating rpm spec from autoconf/automake packages for Fedora-example of spec

Didier Casse didierbe at sps.nus.edu.sg
Wed Jun 16 08:03:50 UTC 2004



Here's an example of my spec attached. But the last part was guessed by
observing the "make install" process. What if I do not want to observe
it? Is there an automated way of knowing which directories it's going to
be installed and what files would be present.

Is there some ready-made perl scripts that can grab such informartion and
modify my spec files?

Thanks.


Cheers,
Didier.



On 16/06/04, at 15:52 +0800, Didier Casse <didierbe at sps.nus.edu.sg> wrote:

> On 16/06/04, at 09:08 +0200, Nils O. Selåsdal <NOS at Utel.no> wrote:
>
> > On Wed, 2004-06-16 at 09:00, Didier Casse wrote:
> > > Dear All,
> > >          I am trying to convert some autonconf/automake packages or
> > > libraries to rpms. Well to generate the spec, fitting
> > > the
> > >
> > > -------------
> > > ./configure
> > > make
> > > make install
> > > -------------
> > Take a look at the fedora .spec template at
> > http://www.fedora.us/docs/spec.html
> > Now, remember that one doesn't use ./configure in a .spec usually,
> > but rather %configure , that will try to make the make install
> > install it temporary while packaging in non default location, such as
> > /var/tmp/foo-2.4.3-root/ , now when you do an rpmbuild , and if it
> > fails, you can just go to /var/tmp/foo-2.4.3-root/ an look at which
> > files it installed.
>
>
> It was just an example. I already know the spec template for packaging! So
> i know the proper steps. I'm only seeking for a way to place these files
> automatically!
>
>
> > > is straightforward! But the autoconf packages install lots of files around
> > > the system.
> > >
> > > So the problem lies in dealing with the part:
> > >
> > > %files
> > > %defattr(-,root,root)
> > > %{_bindir}/
> > Never do the above , it will make the package own the bindir
> > (usr/bin), you don't want that. use %{_bindir}/*
> > > %{_libdir}/lib*
> > > %doc AUTHORS
> > > %doc COPYING
> > > %doc README
> > >
>
>
> Just an example... Please do not take it literally. I packaged rpms
> before so I know what you're telling me!
>
>
>
> > >
> > > where we have to specify all the files that have been installed. Since the
> > > autoconf/automake packages have not been made by me, I do not know which
> > > files are being installed and I have to do everytime  a "make install" to
> > > watch which files are being installed!
> > A good packager must know every file of a package !
>
> Yeah if it's my own package. But unfortunately it's somebody's else
> package so I don't know every files and it keeps changing and sometimes
> the directories change too!
>
>
>
> > > Now is there a way to convert all these autoconf/automake packages
> > > directly to rpms or is there a systematic/automated system to know which
> > > files are being installed and fit directly in the specs?
> > See above.
> > You really only need to know each directory it places files in, and
> > which directories the package should own.
>
> Yeps but the package install in several directories too!
>
> Thanks for the reply though.
>
>
> With kind regards,
>
> Didier.
>
> ---
> PhD student.
>
> Singapore Synchrotron Light Source (SSLS)
> 5 Research Link,
> Singapore 117603
>
> Email: didierbe at sps dot nus dot edu dot sg
>
> Web: http://ssls.nus.edu.sg
>
>
>
>
> --
> fedora-devel-list mailing list
> fedora-devel-list at redhat.com
> http://www.redhat.com/mailman/listinfo/fedora-devel-list
>

-------------- next part --------------
Name: ecore
Summary: ecore
Version: 1.0.0_pre7
Release: 0.20040616.fc1
License: BSD
Group: User Interface/X
URL: http://enlightenment.org/pages/ecore.html
Source0: %{name}-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libjpeg-devel, zlib-devel 
Requires: evas, edb

%description 
Ecore is brub.

%package devel
Summary: Ecore headers and development libraries.
Group: Development/Libraries
Requires: %{name} = %{ver}

%description devel
Ecore development files

%prep 
%setup -q

%build 
./autogen.sh  --prefix=%{_prefix} --bindir=%{_bindir} --libdir=%{_libdir} --includedir=%{_includedir} 

make

%install 
rm -fr %{buildroot}
make install DESTDIR=%{buildroot}

%clean 
rm -fr %{buildroot}
%undefine __check_files

%post 
/sbin/ldconfig

%postun
/sbin/ldconfig

%files 
%defattr(-,root,root)
%{_bindir}/ecore*
%{_libdir}/libecore*
%{_libdir}/ecore_config*
%{_prefix}/share/aclocal/ecore*
%{_includedir}/Ecore*
%doc AUTHORS
%doc COPYING
%doc README

%changelog
* Wed Jun 16 2004 Didier F.B Casse <didier at microtronyx dot com>
* Sun Jun 13 2004 Didier F.B Casse <didier at microtronyx dot com>
* Fri Jun 11 2004 Didier F.B Casse <didier at microtronyx dot com>
* Mon Jun 7 2004 Didier F.B Casse <didier at microtronyx dot com>
* Tue Jun 1 2004 Didier F.B Casse <didier at microtronyx dot com>
* Fri May 28 2004 Didier F.B Casse <didier at microtronyx dot com>
* Mon May 24 2004 Didier F.B Casse <didier at microtronyx dot com>
* Sat May 22 2004 Didier F.B Casse <didier at microtronyx dot com>
* Tue May 18 2004 Didier F.B Casse <didier at microtronyx dot com>
* Mon May 17 2004 Didier F.B Casse <didier at microtronyx dot com>
* Sat May 15 2004 Didier F.B Casse <didier at microtronyx dot com>
* Fri May 14 2004 Didier F.B Casse <didier at microtronyx dot com>
* Tue May 11 2004 Didier F.B Casse <didier at microtronyx dot com> 
-Initial RPM Release



More information about the fedora-devel-list mailing list