Re: packaging files in CVS



On 06 Aug 2001 23:07:51 -0700, Gregory Leblanc wrote:
> ===BEGIN gnome-core.spec.in===
> %define localstatedir   /var/lib
> 
> Summary:         The core programs for the GNOME GUI desktop
> environment.
> Name: 		 gnome-core
> Version: 	 @VERSION@

This let's configure set the correct version when the .spec file gets
created from the .spec.in file.  No more updating the version by hand!

> Release: 	 1
> License: 	 LGPL
> Group: 		 System Environment/Base
> Source:
> ftp://ftp.gnome.org/pub/sources/gnome-core/gnome-core-%{version}.tar.gz
> BuildRoot: 	 /var/tmp/%{name}-%{version}-root
> URL: 		 http://www.gnome.org
> Requires:        gtk+ >= @GTK_REQUIRED@
> Requires:        gdk-pixbuf >= @GDK_PIXBUF_REQUIRED@
> Requires:        libglade >= @LIBGLADE_REQUIRED@, libxml
> Requires:        gnome-libs >= @GNOME_LIBS_REQUIRED@
> Requires:        ORBit >= @ORBIT_REQUIRED@
> Requires:        control-center >= @CONTROL_CENTER_REQUIRED@
> BuildRequires:   gtk+-devel >= @GTK_REQUIRED@, libxml-devel
> BuildRequires:   gdk-pixbuf-devel >= @GDK_PIXBUF_REQUIRED@
> BuildRequires:   libglade-devel >= @LIBGLADE_REQUIRED@
> BuildRequires:   scrollkeeper >= @SCROLLKEEPER_REQUIRED@
> BuildRequires:   gnome-libs-devel >= @GNOME_LIBS_REQUIRED@
> BuildRequires:   ORBit-devel >= @ORBIT_REQUIRED@
> BuildRequires:   control-center-devel >= @CONTROL_CENTER_REQUIRED@

Wow, that looks like hell, doesn't it?  It's actually really cool.  See,
each of those lines lists one of the packages that are required at
either install or build time.  Those wonderful things like
"@GTK_REQUIRED@" are just macros, defined in configure.in.
@GTK_REQUIRED@ is a replacement for the version of GTK+ that's required
in this release.  Nobody has to come in and mess with the spec file, the
program author just needs to change the version number in configure.in.
Pretty easy.  If we're watching cvs commits to these modules, we can see
when hackers add new dependancies, and we can put those into the spec
file.

[snip non-magical section]
> ===END gnome-core.spec.in===
> 
> I know, that's pretty big, and not everything that's been done is clear.
> I'll reply to this message with some explanations in a minute, but
> first, here's a relavent snippit of configure.in, since these two files
> go hand-in-hand.  
> 
> 
> ===BEGIN configure.in snippit===
> dnl If you add a version number here, you *must* add an AC_SUBST line
> for
> dnl it too, or it will never make it into the spec file!
> 
> GTK_REQUIRED=1.3.1
> GDK_PIXBUF_REQUIRED=1.3.1
> LIBGLADE_REQUIRED=0.16
> LIBGNOME_REQUIRED=1.96.0
> LIBGNOME1COMPAT_REQUIRED=1.96.0
> LIBGNOMEUI_REQUIRED=1.96.0
> ORBIT_REQUIRED=2.3.91
> XML_REQUIRED=2.2.8
> LIBCAPPLET_REQUIRED=1.4.0
> SCROLLKEEPER_REQUIRED=0.1.4
> 
> ===END configure.in snippit==

Yeah, here's the version numbers I mentioned.  GTK+ seems to need 1.3.1,
as gnome-core is getting ported to the gtk+ 2 APIs and stuff.  

So, if we maintain the .spec files outside of their modules in CVS,
we've got to update all of this stuff by hand, instead of just having
the tools do the updating for us.  So, thoughts?  Anybody want to get
the debian/ directory for gnome-core current, so that we can all use it
as an example?  How about Solaris, FreeBSD, and Irix people?  Can you
take advantage of something similar?  Can we get your packaging files
into CVS?  (who else has packaging files that I've forgotten?)  Thanks!
	Greg





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