On Tue, 2003-08-12 at 23:28, Raphael Manfredi wrote:
> I have created a gtk-gnutella_spec.SH file in CVS, based on the existing old
> gtk-gnutella.spec.in and on your indications.  When Configure is initially
> ran, it produces the gtk-gnutella.spec file with the proper version indication.
> 
> Can you make sure it works?

Well, I don't have any Redhat systems around. It may or may not on a
Mandrake system, but Redhat specfiles and packages often don't, so that
doesn't mean much.

I've attached a specfile that works perfectly on three different
x86-based systems with different versions of Mandrake (9.1, 9.2 beta 1,
and current Cooker). And I can do all kinds of funky things (like set my
compiler to "ccache distcc", or set my bindir to
/usr/i586-linux-gnu-mandrake/bin and my datadir to /usr/share) and it
still works.

I don't know if it works on lib64-based or embedded Mandrake systems. It
will definitely not build on Redhat, if only because they have no
common-licenses package, Mandrake menu system, Networking group, etc.
Just be glad you don't have any shared libraries; Redhat would have
gtk-gnutella and gtk-gnutella-devel, while Mandrake would have
gtk-gnutella, libgtk-gnutella0_9, and libgtk-gnutella0_9-devel....

I haven't tried simplifying the %makeinstall yet as you suggested in the
other email.

Anyway, something very much like this (but hopefully using 0.92.1 rather
than a CVS version) will build the standard PLF packages for
gtk-gnutella for Mandrake 9.2. Feel free to suggest any changes you
want, but do it quickly, as Mandrake 9.2 isn't that far off.

By the way, at one point, the specfile let you specify options with
rpmbuild --with=gtk2 and so forth, but that's such a huge pain to do in
RPM that Guillaume stripped it out and just standardized on gtk2 with
everything turned on (except ICU, because there is no ICU package for
Mandrake).

--- CUT HERE ---

%define name    gtk-gnutella
%define version 0.92.1
%define prerel  c
%define cvs     20030812
%define release 0.%{prerel}.%{cvs}.1plf
%define summary Gnutella GTK client

Name:           %{name}
Version:        %{version}
Release:        %{release}
Summary:        %{summary}
License:        GPL
Group:          Networking/File transfer
Source:         %{name}-current-%{cvs}.tar.bz2
Source1:        %{name}-remote-shell.txt.bz2
Source10:       %{name}.16.png
Source11:       %{name}.32.png
Source12:       %{name}.48.png
URL:            http://gtk-gnutella.sourceforge.net
Buildroot:      %{_tmppath}/%{name}-buildroot
Requires:       common-licenses
Buildrequires:  gtk+2-devel
Buildrequires:  libxml2-devel
Buildrequires:  bison

%description
Gtk-gnutella is a Gtk+2 clone of Gnutella (see gnutella.wego.com).
It's a fully-featured servent, designed to share any type of file.
Gtk-gnutella implements compressed connections, ultrapeer and leaf 
nodes, Passive/Active Remote Queueing (PARQ), and other modern 
gnutella network features.

This package is included in PLF because it is a peer-to-peer
filesharing application.

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

%build
# There are no standard rpm macros for metaconfig. All of the usual
# configure command-line options are replaced with -D defines, and
# -ders must be included (Defaults, don't ask user to Edit config.sh,
# Reuse symbols, Silent) to avoid interactive mode. Try ./Configure -h
# for a little more info.
./Configure -D_prefix=%_prefix/ -Dbindir=%_bindir/
-Dprivlib=%_datadir/%name/ -Dsysman=%_mandir/man1/ -Dcc="$CC"
-Dccflags="-Wall $CFLAGS" -Doptimize="%optflags" -Dgtkversion=2
-Dremotectrl=true -ders
%make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%_bindir
%makeinstall PREFIX=$RPM_BUILD_ROOT/%_prefix/
BINDIR=$RPM_BUILD_ROOT/%_bindir/
PRIVLIB=$RPM_BUILD_ROOT/%_datadir/%name/
# extra docs
bunzip2 -c %{SOURCE1} > remote-shell.txt

# icons
install -D -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png
install -D -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png
install -D -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png

# menu entry
install -d -m 755 $RPM_BUILD_ROOT%{_menudir}
cat >$RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF
?package(%{name}):\
        command="%{_bindir}/%{name}"\
        title="Gtk-gnutella"\
        longtitle="%{summary}"\
        icon="%{name}.png"\
        needs="x11"\
        section="Networking/File transfer"
EOF
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{update_menus}

%postun
%{clean_menus}

%files -f %{name}.lang
%defattr(-,root,root)
%doc README TODO AUTHORS INSTALL ChangeLog
%doc remote-shell.txt
%{_bindir}/*
%{_datadir}/%name/pixmaps/*
%{_datadir}/%name/gwcache.boot
%{_datadir}/%name/hostiles.txt
%{_miconsdir}/%name.png
%{_iconsdir}/%name.png
%{_liconsdir}/%name.png
%{_menudir}/gtk-gnutella

%changelog
* Fri Aug 12 2003 andi payn <[EMAIL PROTECTED]>
0.92.1-0.c.20030812.1plf
- from Andrew Barnert <[EMAIL PROTECTED]>
  - new CVS version
  - modify specfile for autoconf->metaconfig conversion
- require common-licenses
- PLF reasons

* Sun Jul 20 2003 andi payn <[EMAIL PROTECTED]> 0.92.1-0.c.1plf
- new prerelease version 0.92.1c

* Sun Jul 20 2003 Guillaume Rousse <[EMAIL PROTECTED]> 0.92-2plf
- contributed by andi payn <[EMAIL PROTECTED]>
 - fix buildrequires to ensure xml store, remote shell get built
 - updated description
 - added icons
 - more documentation

* Sun Jun 15 2003 Stefan van der Eijk <[EMAIL PROTECTED]> 0.92-1plf
- 0.92
- BuildRequires

* Wed May 21 2003 Guillaume Rousse <[EMAIL PROTECTED]>
0.92-0.20030520.1plf
- contributed by andi payn <[EMAIL PROTECTED]>
 - build from current CVS snapshot
 - support currently-incomplete localization
 - allow experimental features (remote-shell and gtk2) to be built in

* Fri Mar 14 2003 Stefan van der Eijk <[EMAIL PROTECTED]> 0.91.9.1-1plf
- 0.91.9.1

* Sat Dec 14 2002 Austin Acton <[EMAIL PROTECTED]> 0.91.1-1plf
- bump version and buildrequires
- add pixmaps

* Sun Nov 10 2002 Stefan van der Eijk <[EMAIL PROTECTED] 0.90-2plf
- BuildRequires

* Thu Jul 18 2002 Olivier Thauvin <[EMAIL PROTECTED]> 0.90-1plf
- from Marcel Pol <[EMAIL PROTECTED]> 
        - 0.90

* Tue May 14 2002 Sylvestre Taburet <[EMAIL PROTECTED]>
0.85-1plf
- upped to 0.85

* Sat Mar 09 2002 Yves Duret <[EMAIL PROTECTED]> 0.80-3plf
- spec clean up: macros, menu, menu section
- %%setup -q
- Buildrequires

* Thu Mar 07 2002 Marcel Pol <[EMAIL PROTECTED]> 0.80-2plf
- Used specfile from CVS

* Thu Mar 07 2002 Marcel Pol <[EMAIL PROTECTED]> 0.80-1plf
- PLF build

* Mon Feb 11 2002 Lenny Cartier <[EMAIL PROTECTED]> 0.80-0.2mdk
- fix menu ( thx Michael Reinsch )

* Thu Jan 24 2002 Lenny Cartier <[EMAIL PROTECTED]> 0.80-0.1mdk
- 0.80-beta2

* Thu Nov 22 2001 Lenny Cartier <[EMAIL PROTECTED]> 0.18-1mdk
- 0.18

* Wed Jan 25 2001 Lenny Cartier <[EMAIL PROTECTED]> 0.12-5mdk
- rebuild

* Wed Jan 10 2001 Lenny Cartier <[EMAIL PROTECTED]> 0.12-4mdk
- rebuild

* Mon Sep 04 2000 Lenny Cartier <[EMAIL PROTECTED]> 0.12-3mdk
- macros
- BM

* Mon Jun 26 2000 Guillaume Rousse <[EMAIL PROTECTED]>
0.12-2mdk
- add menu entry

* Mon May 29 2000 Lenny Cartier <[EMAIL PROTECTED]> 0.12-1mdk
- first spec
- new in contribs

%define name    gtk-gnutella
%define version 0.92.1
%define prerel  c
%define cvs     20030812
%define release 0.%{prerel}.%{cvs}.1plf
%define summary Gnutella GTK client

Name:           %{name}
Version:        %{version}
Release:        %{release}
Summary:        %{summary}
License:        GPL
Group:          Networking/File transfer
Source:         %{name}-current-%{cvs}.tar.bz2
Source1:        %{name}-remote-shell.txt.bz2
Source10:       %{name}.16.png
Source11:       %{name}.32.png
Source12:       %{name}.48.png
URL:            http://gtk-gnutella.sourceforge.net
Buildroot:      %{_tmppath}/%{name}-buildroot
Requires:       common-licenses
Buildrequires:  gtk+2-devel
Buildrequires:  libxml2-devel
Buildrequires:  bison

%description
Gtk-gnutella is a Gtk+2 clone of Gnutella (see gnutella.wego.com).
It's a fully-featured servent, designed to share any type of file.
Gtk-gnutella implements compressed connections, ultrapeer and leaf 
nodes, Passive/Active Remote Queueing (PARQ), and other modern 
gnutella network features.

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

%build
# There are no standard rpm macros for metaconfig. All of the usual
# configure command-line options are replaced with -D defines, and
# -ders must be included (Defaults, don't ask user to Edit config.sh,
# Reuse symbols, Silent) to avoid interactive mode. Try ./Configure -h
# for a little more info.
./Configure -D_prefix=%_prefix/ -Dbindir=%_bindir/ -Dprivlib=%_datadir/%name/ 
-Dsysman=%_mandir/man1/ -Dcc="$CC" -Dccflags="-Wall $CFLAGS" -Doptimize="%optflags" 
-Dgtkversion=2 -Dremotectrl=true -ders
%make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%_bindir
%makeinstall DESTDIR=$RPM_BUILD_ROOT/ PREFIX=$RPM_BUILD_ROOT/%_prefix/ 
BINDIR=$RPM_BUILD_ROOT/%_bindir/ PRIVLIB=$RPM_BUILD_ROOT/%_datadir/%name/

# extra docs
bunzip2 -c %{SOURCE1} > remote-shell.txt

# icons
install -D -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png
install -D -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png
install -D -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png

# menu entry
install -d -m 755 $RPM_BUILD_ROOT%{_menudir}
cat >$RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF
?package(%{name}):\
        command="%{_bindir}/%{name}"\
        title="Gtk-gnutella"\
        longtitle="%{summary}"\
        icon="%{name}.png"\
        needs="x11"\
        section="Networking/File transfer"
EOF
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{update_menus}

%postun
%{clean_menus}

%files -f %{name}.lang
%defattr(-,root,root)
%doc README TODO AUTHORS INSTALL ChangeLog
%doc remote-shell.txt
%{_bindir}/*
%{_datadir}/%name/pixmaps/*
%{_datadir}/%name/gwcache.boot
%{_datadir}/%name/hostiles.txt
%{_miconsdir}/%name.png
%{_iconsdir}/%name.png
%{_liconsdir}/%name.png
%{_menudir}/gtk-gnutella

%changelog
* Fri Aug 12 2003 andi payn <[EMAIL PROTECTED]> 0.92.1-0.c.20030812.1plf
- new CVS version
- modify specfile for autoconf->metaconfig conversion
- require common-licenses

* Sun Jul 20 2003 andi payn <[EMAIL PROTECTED]> 0.92.1-0.c.1plf
- new prerelease version 0.92.1c

* Sun Jul 20 2003 Guillaume Rousse <[EMAIL PROTECTED]> 0.92-2plf
- contributed by andi payn <[EMAIL PROTECTED]>
 - fix buildrequires to ensure xml store, remote shell get built
 - updated description
 - added icons
 - more documentation

* Sun Jun 15 2003 Stefan van der Eijk <[EMAIL PROTECTED]> 0.92-1plf
- 0.92
- BuildRequires

* Wed May 21 2003 Guillaume Rousse <[EMAIL PROTECTED]> 0.92-0.20030520.1plf
- contributed by andi payn <[EMAIL PROTECTED]>
 - build from current CVS snapshot
 - support currently-incomplete localization
 - allow experimental features (remote-shell and gtk2) to be built in

* Fri Mar 14 2003 Stefan van der Eijk <[EMAIL PROTECTED]> 0.91.9.1-1plf
- 0.91.9.1

* Sat Dec 14 2002 Austin Acton <[EMAIL PROTECTED]> 0.91.1-1plf
- bump version and buildrequires
- add pixmaps

* Sun Nov 10 2002 Stefan van der Eijk <[EMAIL PROTECTED] 0.90-2plf
- BuildRequires

* Thu Jul 18 2002 Olivier Thauvin <[EMAIL PROTECTED]> 0.90-1plf
- from Marcel Pol <[EMAIL PROTECTED]> 
        - 0.90

* Tue May 14 2002 Sylvestre Taburet <[EMAIL PROTECTED]> 0.85-1plf
- upped to 0.85

* Sat Mar 09 2002 Yves Duret <[EMAIL PROTECTED]> 0.80-3plf
- spec clean up: macros, menu, menu section
- %%setup -q
- Buildrequires

* Thu Mar 07 2002 Marcel Pol <[EMAIL PROTECTED]> 0.80-2plf
- Used specfile from CVS

* Thu Mar 07 2002 Marcel Pol <[EMAIL PROTECTED]> 0.80-1plf
- PLF build

* Mon Feb 11 2002 Lenny Cartier <[EMAIL PROTECTED]> 0.80-0.2mdk
- fix menu ( thx Michael Reinsch )

* Thu Jan 24 2002 Lenny Cartier <[EMAIL PROTECTED]> 0.80-0.1mdk
- 0.80-beta2

* Thu Nov 22 2001 Lenny Cartier <[EMAIL PROTECTED]> 0.18-1mdk
- 0.18

* Wed Jan 25 2001 Lenny Cartier <[EMAIL PROTECTED]> 0.12-5mdk
- rebuild

* Wed Jan 10 2001 Lenny Cartier <[EMAIL PROTECTED]> 0.12-4mdk
- rebuild

* Mon Sep 04 2000 Lenny Cartier <[EMAIL PROTECTED]> 0.12-3mdk
- macros
- BM

* Mon Jun 26 2000 Guillaume Rousse <[EMAIL PROTECTED]> 0.12-2mdk
- add menu entry

* Mon May 29 2000 Lenny Cartier <[EMAIL PROTECTED]> 0.12-1mdk
- first spec
- new in contribs
%define name    gtk-gnutella
%define version 0.92.1
%define prerel  c
%define cvs     20030812
%define release 0.%{prerel}.%{cvs}.1plf
%define summary Gnutella GTK client

Name:           %{name}
Version:        %{version}
Release:        %{release}
Summary:        %{summary}
License:        GPL
Group:          Networking/File transfer
Source:         %{name}-current-%{cvs}.tar.bz2
Source1:        %{name}-remote-shell.txt.bz2
Source10:       %{name}.16.png
Source11:       %{name}.32.png
Source12:       %{name}.48.png
URL:            http://gtk-gnutella.sourceforge.net
Buildroot:      %{_tmppath}/%{name}-buildroot
Requires:       common-licenses
Buildrequires:  gtk+2-devel
Buildrequires:  libxml2-devel
Buildrequires:  bison

%description
Gtk-gnutella is a Gtk+2 clone of Gnutella (see gnutella.wego.com).
It's a fully-featured servent, designed to share any type of file.
Gtk-gnutella implements compressed connections, ultrapeer and leaf 
nodes, Passive/Active Remote Queueing (PARQ), and other modern 
gnutella network features.

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

%build
# There are no standard rpm macros for metaconfig. All of the usual
# configure command-line options are replaced with -D defines, and
# -ders must be included (Defaults, don't ask user to Edit config.sh,
# Reuse symbols, Silent) to avoid interactive mode. Try ./Configure -h
# for a little more info.
./Configure -D_prefix=%_prefix/ -Dbindir=%_bindir/ -Dprivlib=%_datadir/%name/ 
-Dsysman=%_mandir/man1/ -Dcc="$CC" -Dccflags="-Wall $CFLAGS" -Doptimize="%optflags" 
-Dgtkversion=2 -Dremotectrl=true -ders
%make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%_bindir
%makeinstall DESTDIR=$RPM_BUILD_ROOT/ PREFIX=$RPM_BUILD_ROOT/%_prefix/ 
BINDIR=$RPM_BUILD_ROOT/%_bindir/ PRIVLIB=$RPM_BUILD_ROOT/%_datadir/%name/

# extra docs
bunzip2 -c %{SOURCE1} > remote-shell.txt

# icons
install -D -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png
install -D -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png
install -D -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png

# menu entry
install -d -m 755 $RPM_BUILD_ROOT%{_menudir}
cat >$RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF
?package(%{name}):\
        command="%{_bindir}/%{name}"\
        title="Gtk-gnutella"\
        longtitle="%{summary}"\
        icon="%{name}.png"\
        needs="x11"\
        section="Networking/File transfer"
EOF
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{update_menus}

%postun
%{clean_menus}

%files -f %{name}.lang
%defattr(-,root,root)
%doc README TODO AUTHORS INSTALL ChangeLog
%doc remote-shell.txt
%{_bindir}/*
%{_datadir}/%name/pixmaps/*
%{_datadir}/%name/gwcache.boot
%{_datadir}/%name/hostiles.txt
%{_miconsdir}/%name.png
%{_iconsdir}/%name.png
%{_liconsdir}/%name.png
%{_menudir}/gtk-gnutella

%changelog
* Fri Aug 12 2003 andi payn <[EMAIL PROTECTED]> 0.92.1-0.c.20030812.1plf
- new CVS version
- modify specfile for autoconf->metaconfig conversion
- require common-licenses

* Sun Jul 20 2003 andi payn <[EMAIL PROTECTED]> 0.92.1-0.c.1plf
- new prerelease version 0.92.1c

* Sun Jul 20 2003 Guillaume Rousse <[EMAIL PROTECTED]> 0.92-2plf
- contributed by andi payn <[EMAIL PROTECTED]>
 - fix buildrequires to ensure xml store, remote shell get built
 - updated description
 - added icons
 - more documentation

* Sun Jun 15 2003 Stefan van der Eijk <[EMAIL PROTECTED]> 0.92-1plf
- 0.92
- BuildRequires

* Wed May 21 2003 Guillaume Rousse <[EMAIL PROTECTED]> 0.92-0.20030520.1plf
- contributed by andi payn <[EMAIL PROTECTED]>
 - build from current CVS snapshot
 - support currently-incomplete localization
 - allow experimental features (remote-shell and gtk2) to be built in

* Fri Mar 14 2003 Stefan van der Eijk <[EMAIL PROTECTED]> 0.91.9.1-1plf
- 0.91.9.1

* Sat Dec 14 2002 Austin Acton <[EMAIL PROTECTED]> 0.91.1-1plf
- bump version and buildrequires
- add pixmaps

* Sun Nov 10 2002 Stefan van der Eijk <[EMAIL PROTECTED] 0.90-2plf
- BuildRequires

* Thu Jul 18 2002 Olivier Thauvin <[EMAIL PROTECTED]> 0.90-1plf
- from Marcel Pol <[EMAIL PROTECTED]> 
        - 0.90

* Tue May 14 2002 Sylvestre Taburet <[EMAIL PROTECTED]> 0.85-1plf
- upped to 0.85

* Sat Mar 09 2002 Yves Duret <[EMAIL PROTECTED]> 0.80-3plf
- spec clean up: macros, menu, menu section
- %%setup -q
- Buildrequires

* Thu Mar 07 2002 Marcel Pol <[EMAIL PROTECTED]> 0.80-2plf
- Used specfile from CVS

* Thu Mar 07 2002 Marcel Pol <[EMAIL PROTECTED]> 0.80-1plf
- PLF build

* Mon Feb 11 2002 Lenny Cartier <[EMAIL PROTECTED]> 0.80-0.2mdk
- fix menu ( thx Michael Reinsch )

* Thu Jan 24 2002 Lenny Cartier <[EMAIL PROTECTED]> 0.80-0.1mdk
- 0.80-beta2

* Thu Nov 22 2001 Lenny Cartier <[EMAIL PROTECTED]> 0.18-1mdk
- 0.18

* Wed Jan 25 2001 Lenny Cartier <[EMAIL PROTECTED]> 0.12-5mdk
- rebuild

* Wed Jan 10 2001 Lenny Cartier <[EMAIL PROTECTED]> 0.12-4mdk
- rebuild

* Mon Sep 04 2000 Lenny Cartier <[EMAIL PROTECTED]> 0.12-3mdk
- macros
- BM

* Mon Jun 26 2000 Guillaume Rousse <[EMAIL PROTECTED]> 0.12-2mdk
- add menu entry

* Mon May 29 2000 Lenny Cartier <[EMAIL PROTECTED]> 0.12-1mdk
- first spec
- new in contribs

Reply via email to