tags 386715 +patch
thanks

Attached is a patch that builds libgpod2, libgpod2-nogtk, libgpod-nogtk-dev, 
libgpod-dev and whatever packages it usually builds.
I think I have got the depends/conflicts and such stuff correct. Including the 
shlibs for packages builds against the -nogtk version.

As spoken with Frank over IRC, the source patches are directly in the files 
(without any patchsystem)  and the package has been switched away from cdbs.
The rules file ended up being as long with cdbs as without it.

If there is any questions or other issues, feel free to ask questions.
If not, you are most welcome to do a upload ;)

I am currently testbuilding amarok against this -nogtk package.

/Sune
-- 
How could I remove a SIMM from Photoshop 98?

First you neither must log from a prompt over a editor on a desktop on the 
Ultra ISA space bar, nor should upload the port to telnet from the digital 
TCP connection.
diff -u libgpod-0.5.2/debian/control libgpod-0.5.2/debian/control
--- libgpod-0.5.2/debian/control
+++ libgpod-0.5.2/debian/control
@@ -9,10 +9,40 @@
 XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-gtkpod/libgpod/trunk/
 XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-gtkpod/libgpod/trunk/
 
+Package: libgpod-nogtk-dev
+Section: libdevel
+Architecture: any
+Depends: libgpod2-nogtk (= ${binary:Version}),  libglib2.0-dev
+Conflicts: libgpod-dev, libgpod2
+Description: a library to read and write songs and artwork to an iPod
+ libgpod is a library meant to abstract access to an iPod content. It
+ provides an easy to use API to retrieve the list of files and playlist
+ stored on an iPod, to modify them and to save them back to the iPod
+ .
+ This version does not use gtk.
+ .
+ This package contains the include files and static library.
+
+Package: libgpod2-nogtk
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Conflicts: libgpod2
+Recommends: libgpod-common
+Description: a library to read and write songs and artwork to an iPod
+ libgpod is a library meant to abstract access to an iPod content. It
+ provides an easy to use API to retrieve the list of files and playlist
+ stored on an iPod, to modify them and to save them back to the iPod
+ .
+ This version does not use gtk.
+ .
+ This package contains the shared library.
+
 Package: libgpod-dev
 Section: libdevel
 Architecture: any
 Depends: libgpod2 (= ${binary:Version}), libgtk2.0-dev, libglib2.0-dev
+Conflicts: libgpod-nogtk-dev
 Description: a library to read and write songs and artwork to an iPod
  libgpod is a library meant to abstract access to an iPod content. It
  provides an easy to use API to retrieve the list of files and playlist
@@ -25,11 +55,14 @@
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Recommends: libgpod-common
+Conflicts: libgpod2-nogtk
 Description: a library to read and write songs and artwork to an iPod
  libgpod is a library meant to abstract access to an iPod content. It
  provides an easy to use API to retrieve the list of files and playlist
  stored on an iPod, to modify them and to save them back to the iPod
  .
+ This version contains gdk pixbuf.
+ .
  This package contains the shared library.
 
 Package: libgpod-common
diff -u libgpod-0.5.2/debian/rules libgpod-0.5.2/debian/rules
--- libgpod-0.5.2/debian/rules
+++ libgpod-0.5.2/debian/rules
@@ -3,21 +3,95 @@
-include /usr/share/cdbs/1/class/autotools.mk
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/rules/simple-patchsys.mk
-include /usr/share/cdbs/1/class/gnome.mk
+
+SONAME=2
+VERSION=$(shell head -1 debian/changelog | sed 's/.*(//;s/).*//;s/-[^-]*$$//')
 
 DEB_CONFIGURE_SCRIPT_ENV += LDFLAGS="-Wl,-O1 -Wl,--as-needed"
-DEB_CONFIGURE_EXTRA_FLAGS += --with-python=no
 
-DEB_DH_MAKESHLIBS_ARGS_libgpod2 := -V 'libgpod2'
+export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+# FOR AUTOCONF 2.52 AND NEWER ONLY
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+  confflags += --build $(DEB_HOST_GNU_TYPE)
+else
+  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
+
+
+DEB_CONFIGURE_INVOKE=$(CURDIR)/configure $(confflags) --prefix=/usr --includedir="\$${prefix}/include" --mandir="\$${prefix}/share/man" --infodir="\$${prefix}/share/info" --sysconfdir=/etc --localstatedir=/var --libexecdir="\$${prefix}/lib/libgpod" --disable-maintainer-mode --disable-dependency-tracking --srcdir=$(CURDIR)
+
+configure-common:
+	cp -f /usr/share/misc/config.sub config.sub
+	cp -f /usr/share/misc/config.guess config.guess
+
+configure/libgpod$(SONAME): configure-common
+	mkdir -p $(subst configure/,build/,$@)
+	cd $(subst configure/,build/,$@) && $(DEB_CONFIGURE_SCRIPT_ENV) $(DEB_CONFIGURE_INVOKE) --with-python=no $(DEB_CONFIGURE_EXTRA_FLAGS)
+
+configure/libgpod$(SONAME)-nogtk: configure-common
+	mkdir -p $(subst configure/,build/,$@)
+	cd $(subst configure/,build/,$@) && $(DEB_CONFIGURE_SCRIPT_ENV) $(DEB_CONFIGURE_INVOKE) --with-python=no --disable-gdk-pixbuf $(DEB_CONFIGURE_EXTRA_FLAGS)
+
+build/libgpod$(SONAME) build/libgpod$(SONAME)-nogtk: configure-stamp
+	cd $@ && make
+
+configure-stamp: configure/libgpod$(SONAME) configure/libgpod$(SONAME)-nogtk
+	touch $@
+
 
-install/python-gpod::
+install/libgpod$(SONAME) install/libgpod$(SONAME)-nogtk:
+	cd $(subst install/,build/,$@) && make install DESTDIR=$(CURDIR)/debian/tmp$(subst install/libgpod$(SONAME),,$@)
+
+
+install/python-gpod:
 	PYVERS=$$(pyversions -v -r ./debian/control) ; \
-	for PYVER in $$PYVERS; do \
-		export PYTHON=python$$PYVER ; $(DEB_CONFIGURE_INVOKE) && \
+	cd build/libgpod$(SONAME) && for PYVER in $$PYVERS; do \
+		export PYTHON=python$$PYVER ; $(DEB_CONFIGURE_SCRIPT_ENV) $(DEB_CONFIGURE_INVOKE) --with-python=yes $(DEB_CONFIGURE_EXTRA_FLAGS) && \
 		cd bindings/python && \
 		$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp && \
 		cd ../.. ; \
 	done
 
-binary-install/python-gpod::
+clean:: 
+	rm -rf build
+	dh_clean
+	rm -rf debian/tmp-nogtk
+	rm -f configure-stamp build-stamp install-stamp
+	rm -f debian/libgpod-nogtk-dev.install debian/libgpod$(SONAME)-nogtk.install debian/libgpod-nogtk-dev.links
+	rm -f config.guess config.sub
+
+
+binary-arch: build-stamp install-stamp
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs ChangeLog
+	dh_installdocs
+	sed 's#debian/tmp/##' debian/libgpod$(SONAME).install > debian/libgpod$(SONAME)-nogtk.install
+	sed 's#debian/tmp/##' debian/libgpod-dev.install > debian/libgpod-nogtk-dev.install
+	dh_install -Nlibgpod$(SONAME)-nogtk -Nlibgpod-nogtk-dev
+	dh_install -plibgpod$(SONAME)-nogtk -plibgpod-nogtk-dev  --sourcedir=debian/tmp-nogtk
 	dh_pycentral -ppython-gpod
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs -plibgpod$(SONAME) -V
+	dh_makeshlibs -plibgpod$(SONAME)-nogtk -V 'libgpod$(SONAME)-nogtk (>= $(VERSION)) | libgpod$(SONAME) (>= $(VERSION))'
+	dh_shlibdeps -Llibgpod$(SONAME)
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-arch binary-indep
+binary-indep:
+
+build: build/libgpod$(SONAME) build/libgpod$(SONAME)-nogtk
+
+build-stamp: build
+	touch $@
+
+install-stamp: install/libgpod$(SONAME) install/libgpod$(SONAME)-nogtk install/python-gpod
+
+.PHONY: build configure/libgpod$(SONAME) configure/libgpod$(SONAME)-nogtk install/python-gpod install/libgpod$(SONAME) install/libgpod$(SONAME)-nogtk binary-arch binary-indep binary configure-common
+
diff -u libgpod-0.5.2/debian/changelog libgpod-0.5.2/debian/changelog
--- libgpod-0.5.2/debian/changelog
+++ libgpod-0.5.2/debian/changelog
@@ -1,3 +1,12 @@
+libgpod (0.5.2-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Build a package without gtk dependency. (Closes: #386715)
+  * Redo build system without cdbs.
+  * Add gtk patch directly in diff.gz
+
+ -- Sune Vuorela <[EMAIL PROTECTED]>  Mon, 16 Jul 2007 15:03:29 +0200
+
 libgpod (0.5.2-2) unstable; urgency=low
 
   * Upload to unstable
only in patch2:
unchanged:
--- libgpod-0.5.2.orig/src/itdb_artwork.c
+++ libgpod-0.5.2/src/itdb_artwork.c
@@ -849,9 +849,11 @@
     g_return_if_fail (thumb);
 
     g_free (thumb->image_data);
+#ifdef HAVE_GDKPIXBUF
     if (thumb->pixbuf) {
         g_object_unref (G_OBJECT (thumb->pixbuf));
     }
+#endif
     g_free (thumb->filename);
     g_free (thumb);
 }
@@ -883,9 +885,11 @@
 	memcpy (new_thumb->image_data, thumb->image_data,
 		new_thumb->image_data_len);
     }
+#ifdef HAVE_GDKPIXBUF
     if (thumb->pixbuf) {
         g_object_ref (G_OBJECT (thumb->pixbuf));
     }
+#endif
     return new_thumb;
 }
 

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to