Re: Suggestion: put .rpm & .deb packacking scripts in CVS



> Even simpler perhaps, a script that does everything, including running
> configure before making all the sub-packages. This means a newbie can untar
> the files, run a single script, and have it all just happen. ?

For people building out a cvs, I think a makefile is nice.  Everybody
knows how to use them, and they are easy to configure.  Below is
what I've been using.
You can make configure, make make-install or make all,
and specify DIRS to override the set of directories made.

Perhaps people with more Gnome experience can suggest
improvements.

	--Per Bothner
Cygnus Solutions     bothner@cygnus.com     http://www.cygnus.com/~bothner

# Makefile for building GNOME packages
# Written by Per Bothner <bothner@cygnus.com>
# January 1998

srcdir = /usr/src/gnomecvs
builddir = .
prefix = /opt/gnome
THISMAKEFILE = $(srcdir)/make-gnome

SH_VARS = \
  PATH=$(prefix)/bin:$$PATH; \
  ACLOCAL_FLAGS="-I $(prefix)/share/aclocal"; \
  LD_LIBRARY_PATH=$(prefix)/lib; \
  LD_RUN_PATH=$(prefix)/lib; \
  GLIB_CONFIG=$(prefix)/bin/glib-config; \
  export PATH ACLOCAL_FLAGS LD_LIBRARY_PATH GLIB_CONFIG

# Generic rules for most sub-directories..

configure-$(SUBDIR):
	test -d $(SUBDIR) || mkdir $(SUBDIR); \
	cd $(SUBDIR);  $(SH_VARS); \
	$(srcdir)/$(SUBDIR)/autogen.sh --srcdir $(srcdir)/$(SUBDIR) \
		--prefix $(prefix)

make-install-$(SUBDIR):
	cd $(SUBDIR) && $(SH_VARS) && make && make install

# Specific rules for unusual sub-directories..

configure-gnome-audio:
	echo nothing to configure for $(SUBDIR)

make-install-gnome-audio:
	cd $(srcdir)/$(SUBDIR)/sounds && $(SH_VARS) && make install

DIRS = glib gtk+ imlib audiofile esound libIDL ORBit gnome-libs \
  gnome-core gnome-common gnome-audio control-center\
  ee gnome-games \
  fnlib stringlist

MAKETHIS = $(MAKE) -f $(THISMAKEFILE)

configure:
	set -e; \
	  $(SH_VARS); \
	  for dir in $(DIRS); do \
	    $(MAKETHIS) configure-$${dir} SUBDIR=$${dir}; done

make-install:
	set -e; \
	  $(SH_VARS); \
	  for dir in $(DIRS); do \
	    $(MAKETHIS) make-install-$${dir} SUBDIR=$${dir}; done

all:
	set -e; \
	for dir in $(DIRS); do \
	  $(MAKETHIS) configure-subdir SUBDIR=$${dir}; \
	  cd $${dir}; \
	  make; \
	  make install; \
	  cd ..; \
	done



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