[PATCH] Let GARNOME and Debian be friends :)



 Hello all,

 The attached patch lets garnome detect and use debian installed
 packages instead of compiling everything regardles.

 This may be good for some things and bad for others. It will be less
 resource consumming for people, but they will be testing the latest
 debian releases of some packages and not the latest gnome releases.

 Anyway the "Debian integration" is optional.

 Also note that it is not well tested and it doens't quite work right, I
 suspect that there are some file location/permision problem, since now
 some of the packages are installed globally on the system. But for now
 you get the idea (read debian/README for more info).

 Making garnome building .deb files automatically could be the next step
 :) Well, maybe a big .deb with all that is not jet available in debian
 and apropriate dependencies on available stuff.

 thanks for a great job

 	ranty

 PS: I send a similar message which didn't get to the list because I was
 not subscribed, this one carries a newer patch.
 
-- 
--- 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	Mon May 13 00:14:23 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
+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
+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	Mon May 13 00:16:02 2002
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+is_available () {
+	PACKAGES="$*"
+	if [ ! "$PACKAGES" ]; then
+		#There are no debian packages for this
+		#so we fail inmediately
+		return 1
+	fi
+	for PACKAGE in $PACKAGES
+	do
+		if ! dpkg -s $PACKAGE 2>/dev/null \
+			| grep -q "^Status: install ok installed"
+		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/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


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