Re: [PATCH] Let GARNOME and Debian be friends :)



On Tue, May 14, 2002 at 09:07:02AM -0700, Nick Moffitt wrote:
> begin  ranty-bulk bigfoot com  quotation:
> >  It shouln't be hard to do versioned depends, let me try ;)
> 
> 	Well, this is a feature I've been thinking about in the main
> GAR tree.  I was originally thinking of making the deps
> colon-separated tuples somehow.  I'd be interested in seeing what you
> come up with!

 Here it is, I hope that you like it. The idea is trying to have a
 minimum version number for debian packages. Look at
 debian/debian-packages for a format sample.
 
 Maybe the version number could be taken out of GAR's Makefiles, you can
 probably decide that better than I.


 And about other matters. Could you guys tell me the default path for
 this, please: (I will include de ones that I think I know)

 BONOBO_ACTIVATION_PATH=/usr/lib/bonobo/servers
 DESKTOP_FILE_PATH
 GNOME2_PATH
 GNOME_PATH
 GNOME_VFS_MODULE_CONFIG_PATH
 GNOME_VFS_MODULE_PATH
 GNUMERIC_PLUGIN_PATH
 GTK_PATH
 LIBGLADE_MODULE_PATH
 ORBIT_TYPELIB_PATH
 PKG_CONFIG_PATH=/usr/lib/pkgconfig/

 The idea is pointing them all to my garnome install directory to try to
 make sure that everything is found.


 thanks

 	ranty

-- 
--- Manuel Estrada Sainz <ranty debian org>
                         <ranty bigfoot com>
			 <ranty users sourceforge net>
------------------------ <manuel estrada hispalinux es> -------------------
God grant us the serenity to accept the things we cannot change, courage to
change the things we can, and wisdom to know the difference.
diff -urN garnome-0.9.8.orig/debian/README garnome-0.9.8/debian/README
--- garnome-0.9.8.orig/debian/README	Thu Jan  1 01:00:00 1970
+++ garnome-0.9.8/debian/README	Mon May 13 18:47:44 2002
@@ -0,0 +1,77 @@
+
+Esplanation:
+-----------
+
+debian-essential:
+	It is a list of essential debian packages as listed in README.
+
+install-debian-essential: (should be executable)
+	will try to install packages listed debian-essential.
+
+debian-packages:
+	correlation between garnome and debian packages.
+
+garnome2debian: (should be executable)
+	tells what debian packages are neede to fullfill a garnome dependency.
+
+fake-installs: (should be executable)
+	checks the installed debian packages and fakes a garnome instalation
+	for the packages that are already installed on the system.
+
+	It also removes the fake instalation if it finds out that some package
+	is not anymore installed.
+
+	If GARNOME_ALWAYS_CLEAN is set, it will clean a previously garnome
+	compiled package if it finds it installed by dpkg.
+
+xsession:
+	proposed .xsession file, not quite the same as proposed in README.
+
+"make show-dep"
+	will tell you all the garnome dependencies of the package.
+
+"make show-debian-dep"
+	will tell you the debian packages you may install to fullfill some of
+	the dependecies of the package.
+
+NOTE: maintaining this is just a matter of keeping debian-essential and
+debian-packages updated (comments '#' are allowed in both of them).
+
+How to use:
+----------
+
+1) go to the package directory (e.g. meta/gnome-desktop ) and run:
+	make show-debian-dep
+2) install as many of the listed debian packages as you are willing to install.
+
+3) change directory to garnome-0.9.8/debian and run:
+
+	./fake-installs
+
+4) go back to the package directory and run:
+
+	export PKG_CONFIG_PATH=~/garnome/lib/pkgconfig/
+	make install
+
+Problems:
+--------
+
+Some stuff is not working quite right, I would say that since some packages
+are system wide and some garnome's some files are not found properly.
+
+This are all the _PATH environment variables I could find with:
+	grep -r "getenv.*_PATH" gnome | sed -e's/[^"].*"\([^"]*\)".*$/\1/' | \
+		sort -u
+Setting some of them will probably improve the situation.
+
+BONOBO_ACTIVATION_PATH
+DESKTOP_FILE_PATH
+GNOME2_PATH
+GNOME_PATH
+GNOME_VFS_MODULE_CONFIG_PATH
+GNOME_VFS_MODULE_PATH
+GNUMERIC_PLUGIN_PATH
+GTK_PATH
+LIBGLADE_MODULE_PATH
+ORBIT_TYPELIB_PATH
+PKG_CONFIG_PATH
diff -urN garnome-0.9.8.orig/debian/debian-essential garnome-0.9.8/debian/debian-essential
--- garnome-0.9.8.orig/debian/debian-essential	Thu Jan  1 01:00:00 1970
+++ garnome-0.9.8/debian/debian-essential	Mon May 13 00:11:17 2002
@@ -0,0 +1,19 @@
+     libpng2-dev	#installing libpng-dev makes gnome 1.x development
+			#environment to go away
+     libjpeg-dev
+     libtiff-dev
+     xlibs-dev
+     libpopt-dev
+     libgdbmg1-dev
+     libgmp3-dev 
+     texinfo
+     libgnome-dev
+     libdb3-dev
+     libbz2-dev zlib1g-dev
+     gettext
+     bison #byacc 
+     flex
+     python2.2 python2.2-xml
+     sp sgml-data docbook-xml docbook-xsl
+     libncurses5-dev
+     e2fslibs-dev # needed for gfloppy
diff -urN garnome-0.9.8.orig/debian/debian-packages garnome-0.9.8/debian/debian-packages
--- garnome-0.9.8.orig/debian/debian-packages	Thu Jan  1 01:00:00 1970
+++ garnome-0.9.8/debian/debian-packages	Tue May 14 18:37:03 2002
@@ -0,0 +1,80 @@
+gnome/GConf:		#libgconf2-dev
+			#we don't want to mess with the system's
+			#global configuration, and the easiest way is using
+			#our own GConf
+gnome/ORBit2:		liborbit2-dev
+gnome/acme:
+gnome/at-spi:		at-spi
+gnome/atk:		libatk1.0-dev
+gnome/audiofile:		libaudiofile-dev
+gnome/bonobo-activation:	libbonobo-activation-dev
+gnome/bug-buddy:		bug-buddy
+gnome/control-center:	
+gnome/eel:		libeel2-dev
+gnome/eog:		
+gnome/esound:		libesd0-dev esound
+gnome/file-roller:	
+gnome/freetype:		libfreetype6-dev
+gnome/gail:		libgail-dev
+gnome/gal2:		libgal2-dev
+gnome/gconf-editor:	gconf-editor
+gnome/gdm:		
+gnome/gedit2:		
+gnome/ggv:		
+gnome/gimp:		
+gnome/glib:		libglib2.0-dev=2.0.1-2
+gnome/gnome-applets:	
+gnome/gnome-common:	
+gnome/gnome-desktop:	
+gnome/gnome-games:	
+gnome/gnome-media:	
+gnome/gnome-mime-data:	
+gnome/gnome-panel:	
+gnome/gnome-session:	
+gnome/gnome-system-monitor:
+gnome/gnome-terminal:
+gnome/gnome-utils:
+gnome/gnome-vfs:		libgnomevfs2-dev
+gnome/gnome-vfs-extras:	
+gnome/gnumeric:		
+gnome/gtk+:		libgtk2.0-dev=2.0.2-2
+gnome/gtk-doc:		gtk-doc-tools
+gnome/gtk-engines:	
+gnome/gtk-thinice-engine:	
+gnome/intltool:		intltool
+gnome/libIDL:		libidl-dev
+gnome/libart_lgpl:	libart-2.0-dev
+gnome/libbonobo:		libbonobo2-dev
+gnome/libbonoboui:	libbonoboui2-dev
+gnome/libgail-gnome:	libgail-gnome-dev
+gnome/libglade:		libglade2-dev
+gnome/libgnome:		libgnome2-dev
+gnome/libgnomecanvas:	libgnomecanvas2-dev
+gnome/libgnomeprint:	libgnomeprint2-dev
+gnome/libgnomeprintui:	libgnomeprintui-dev
+gnome/libgnomeui:	libgnomeui-dev
+gnome/libgtkhtml:	libgtkhtml2-dev
+gnome/libgtop:		#libgtop2-dev it doesn't include libgtop-2.0.pc
+gnome/libmrproject:	
+gnome/libole2:		
+gnome/librep:		
+gnome/librsvg:		librsvg2-dev
+gnome/libwnck:		libwnck-dev
+gnome/libxml2:		libxml2-dev
+gnome/libxslt:		libxslt1-dev
+gnome/libzvt:		libzvt2-dev
+gnome/linc:		liblinc-dev
+gnome/metacity:		metacity
+gnome/metatheme:		
+gnome/mrproject:		
+gnome/nautilus:		
+gnome/nautilus-gtkhtml:	
+gnome/nautilus-mozilla:	
+gnome/pango:		libpango1.0-dev
+gnome/pkgconfig:		pkg-config
+gnome/rep-gtk:		
+gnome/sawfish:		
+gnome/scrollkeeper:	#libscrollkeeper-dev scrollkeeper
+			#same as GConf
+gnome/xchat:		
+gnome/yelp:		yelp
diff -urN garnome-0.9.8.orig/debian/fake-installs garnome-0.9.8/debian/fake-installs
--- garnome-0.9.8.orig/debian/fake-installs	Thu Jan  1 01:00:00 1970
+++ garnome-0.9.8/debian/fake-installs	Tue May 14 18:40:16 2002
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+is_available () {
+	local PACKAGES PACKAGE NAME REQ_VERSION VERSION STATUS
+	PACKAGES="$*"
+	if [ ! "$PACKAGES" ]; then
+		#There are no debian packages for this
+		#so we fail inmediately
+		return 1
+	fi
+	for PACKAGE in $PACKAGES
+	do
+		NAME=$(expr "$PACKAGE" : '\(.*\)=')
+		REQ_VERSION=$(expr "$PACKAGE" : '.*=\(.*\)')
+		[ "$NAME" ] || NAME="$PACKAGE"
+
+		eval $(dpkg -s $NAME 2> /dev/null | \
+			sed -n \
+				-e's/[	 ]*$//' \
+				-e's/^Version: */VERSION=/p' \
+				-e's/^Status: *\([^ ].*\)$/STATUS="\1"/p'
+			)
+		if [ "$REQ_VERSION" ] \
+			&& ([ "$STATUS" != "install ok installed" ] \
+			|| ! dpkg --compare-versions \
+				"$VERSION" ">=" "$REQ_VERSION")
+		then
+			return 1
+		fi
+	done
+	return 0
+}
+
+grep "$1" debian-packages | sed -e's/#.*$//' -e'/^[ 	]*$/d' | (
+read LINE
+while [ "$LINE" ]
+do
+	GNOME=`expr "$LINE" : '\([^:]*\):'`
+	DEBIAN=`expr "$LINE" : '.*:\(.*\)'`
+
+	echo -n "$GNOME: "
+	if is_available $DEBIAN; then
+		echo -n "DEBIAN-INSTALLED "
+		if [ "$GARNOME_ALWAYS_CLEAN" ]
+		then
+			echo -e -n "\n\tcleaning garnome "
+			make -C ../$GNOME clean > /dev/null 2>&1
+		fi
+		if ! make -C ../$GNOME install-p > /dev/null 2>&1
+		then
+			echo -e -n "\n\tfaking garnome "
+			make -C ../$GNOME fake-install > /dev/null 2>&1
+		fi
+	else
+		if make -C ../$GNOME install-p > /dev/null 2>&1
+		then
+			echo -n "GARNOME-INSTALLED "
+		else
+			echo -n "UNAVAILABLE "
+		fi
+		FAKE=$(find ../$GNOME -name fake-install)
+		if [ "$FAKE" ]
+		then
+			echo -e -n "\n\tcleaning garnome fake"
+			make -C ../$GNOME clean y$> /dev/null 2>&1
+		fi
+	fi
+	echo 
+	read LINE
+done
+)
diff -urN garnome-0.9.8.orig/debian/garnome2debian garnome-0.9.8/debian/garnome2debian
--- garnome-0.9.8.orig/debian/garnome2debian	Thu Jan  1 01:00:00 1970
+++ garnome-0.9.8/debian/garnome2debian	Sun May 12 20:33:57 2002
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+for dep in "$@"
+do
+	grep "^$dep" debian-packages \
+		| cut -d"#" -f1 | sed -n \
+			-e's/^[^:]*://' \
+			-e's/[	 ][ 	]*/ /g' \
+			-e'/[^	 ]/p'
+done
diff -urN garnome-0.9.8.orig/debian/install-debian-essential garnome-0.9.8/debian/install-debian-essential
--- garnome-0.9.8.orig/debian/install-debian-essential	Thu Jan  1 01:00:00 1970
+++ garnome-0.9.8/debian/install-debian-essential	Sun May 12 20:15:44 2002
@@ -0,0 +1,4 @@
+#!/bin/sh
+echo "I need to be 'root' to install some packages"
+TO_INSTALL=`sed -e's/#.*$//' debian-essential | tr '\n' ' '`
+su -c "aptitude install $TO_INSTALL"
diff -urN garnome-0.9.8.orig/debian/xsession garnome-0.9.8/debian/xsession
--- garnome-0.9.8.orig/debian/xsession	Thu Jan  1 01:00:00 1970
+++ garnome-0.9.8/debian/xsession	Mon May 13 11:36:25 2002
@@ -0,0 +1,9 @@
+PATH=$HOME/garnome/bin:$PATH
+BONOBO_ACTIVATION_PATH=$HOME/garnome/lib/bonobo/servers
+LD_LIBRARY_PATH=$HOME/garnome/lib:$LD_LIBRARY_PATH
+GDK_USE_XFT=1
+PKG_CONFIG_PATH=$HOME/garnome/lib/pkgconfig/
+
+export PATH LD_LIBRARY_PATH GDK_USE_XFT BONOBO_ACTIVATION_PATH PKG_CONFIG_PATH
+exec $HOME/garnome/bin/gnome-session
+
diff -urN garnome-0.9.8.orig/gar.lib.mk garnome-0.9.8/gar.lib.mk
--- garnome-0.9.8.orig/gar.lib.mk	Sun May 12 15:14:34 2002
+++ garnome-0.9.8/gar.lib.mk	Sun May 12 17:11:57 2002
@@ -217,6 +217,12 @@
 	@$(INSTALL_ENV) $(MAKE) -C $* $(INSTALL_ARGS) install
 	$(MAKECOOKIE)
 
+fake-install-%/Makefile:
+	@echo " ==> Faking make install in $*"
+	@mkdir -p $(COOKIEDIR)/install-$*
+	@touch  $(COOKIEDIR)/install-$*/fake-install
+	$(subst fake-,,$(MAKECOOKIE))
+
 ######################################
 # Use a manifest file of the format:
 # src:dest[:mode[:owner[:group]]]
@@ -287,6 +293,9 @@
 	@echo ' ==> Building $* as a dependency'
 	@$(MAKE) -C $(GARDIR)/$* install-p > /dev/null 2>&1 || $(MAKE) -C $(GARDIR)/$* install
 
+show-dep-real-$(GARDIR)/%:
+	@echo '  $*' >&2
+	@$(MAKE) -C $(GARDIR)/$* show-dep-real > /dev/null
 
 # Mmm, yesssss.  cookies my preciousssss!  Mmm, yes downloads it
 # is!  We mustn't have nasty little gmakeses deleting our
diff -urN garnome-0.9.8.orig/gar.mk garnome-0.9.8/gar.mk
--- garnome-0.9.8.orig/gar.mk	Sun May 12 15:14:34 2002
+++ garnome-0.9.8/gar.mk	Sun May 12 17:11:57 2002
@@ -181,6 +181,15 @@
 configure: patch $(addprefix builddep-$(GARDIR)/,$(BUILDDEPS)) $(addprefix dep-$(GARDIR)/,$(LIBDEPS)) pre-configure $(addprefix configure-,$(CONFIGURE_SCRIPTS)) post-configure
 	$(DONADA)
 
+show-dep-real: $(addprefix show-dep-real-$(GARDIR)/,$(LIBDEPS))
+
+show-dep:
+	@$(MAKE) show-dep-real 2>&1 | sort -u
+
+show-debian-dep:
+	@cd ../../debian/ && ./garnome2debian \
+		$(shell $(MAKE) show-dep-real 2>&1 | sort -u)
+
 # returns true if configure has completed successfully, false
 # otherwise
 configure-p:
@@ -201,6 +210,10 @@
 
 # install		- Install the results of a build.
 install: build $(addprefix dep-$(GARDIR)/,$(INSTALLDEPS)) pre-install $(addprefix install-,$(INSTALL_SCRIPTS)) post-install
+	$(DONADA)
+
+
+fake-install:  $(addprefix fake-install-,$(INSTALL_SCRIPTS))
 	$(DONADA)
 
 # returns true if install has completed successfully, false
diff -urN garnome-0.9.8.orig/gnome/glib/cookies/install-work/glib-2.0.1/Makefile garnome-0.9.8/gnome/glib/cookies/install-work/glib-2.0.1/Makefile
--- garnome-0.9.8.orig/gnome/glib/cookies/install-work/glib-2.0.1/Makefile	Thu Jan  1 01:00:00 1970
+++ garnome-0.9.8/gnome/glib/cookies/install-work/glib-2.0.1/Makefile	Tue May 14 18:27:02 2002
@@ -0,0 +1 @@
+Tue May 14 18:27:02 CEST 2002
diff -urN garnome-0.9.8.orig/gnome/gnome-applets/Makefile garnome-0.9.8/gnome/gnome-applets/Makefile
--- garnome-0.9.8.orig/gnome/gnome-applets/Makefile	Sun May 12 15:14:34 2002
+++ garnome-0.9.8/gnome/gnome-applets/Makefile	Sun May 12 17:11:57 2002
@@ -3,7 +3,7 @@
 CATEGORIES = gnome
 DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2
 
-LIBDEPS = gnome/gnome-panel gnome/scrollkeeper gnome/libgtop gnome/gnome-vfs gnome/GConf
+LIBDEPS = gnome/gnome-panel gnome/scrollkeeper gnome/libgtop gnome/gnome-vfs gnome/GConf gnome/gail
 
 DESCRIPTION = gnome-applets
 define BLURB
diff -urN garnome-0.9.8.orig/gnome/gtk+/cookies/install-work/gtk+-2.0.2/Makefile garnome-0.9.8/gnome/gtk+/cookies/install-work/gtk+-2.0.2/Makefile
--- garnome-0.9.8.orig/gnome/gtk+/cookies/install-work/gtk+-2.0.2/Makefile	Thu Jan  1 01:00:00 1970
+++ garnome-0.9.8/gnome/gtk+/cookies/install-work/gtk+-2.0.2/Makefile	Tue May 14 18:36:39 2002
@@ -0,0 +1 @@
+Tue May 14 18:36:39 CEST 2002
diff -urN garnome-0.9.8.orig/gnome/yelp/cookies/install-work/yelp-0.7/Makefile garnome-0.9.8/gnome/yelp/cookies/install-work/yelp-0.7/Makefile
--- garnome-0.9.8.orig/gnome/yelp/cookies/install-work/yelp-0.7/Makefile	Thu Jan  1 01:00:00 1970
+++ garnome-0.9.8/gnome/yelp/cookies/install-work/yelp-0.7/Makefile	Tue May 14 18:31:27 2002
@@ -0,0 +1 @@
+Tue May 14 18:31:27 CEST 2002


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