Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] svn commit: [26236] trunk/buildroot/package: shared-mime-info
@ 2009-04-29  7:21 tpetazzoni at uclibc.org
  2009-04-29  7:32 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: tpetazzoni at uclibc.org @ 2009-04-29  7:21 UTC (permalink / raw)
  To: buildroot

Author: tpetazzoni
Date: 2009-04-29 07:21:02 +0000 (Wed, 29 Apr 2009)
New Revision: 26236

Log:
Add the shared-mime-info package

The shared-mime-info package contains the core database of common
types and the update-mime-database command used to extend it.

The only thing that is actually needed in the target is the file
mime.cache. In order to generate that file, shared-mime-info is
installed into the staging-dir. The idea is that other packages might
add more mime-info files and these should be collected in
staging-dir. From there the mime.cache file is created using tools
installed in host-dir and copied to target.

From Sven Neumann <s.neumann@raumfeld.com>

Modifications by Thomas Petazzoni :

 * Add a patch to the main Makefile.am so that the $(XMLLINT) variable
   is used instead of hardcoding xmllint

 * Apply the patch in the host build of shared-mime-info

 * In the target build, pass an XMLLINT environment variable so that
   the xmllint binary isn't searched in $(STAGING_DIR) but in
   $(HOST_DIR)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>



Added:
   trunk/buildroot/package/shared-mime-info/
   trunk/buildroot/package/shared-mime-info/Config.in
   trunk/buildroot/package/shared-mime-info/shared-mime-info-0.60-fix-xmllint.patch
   trunk/buildroot/package/shared-mime-info/shared-mime-info.mk

Modified:
   trunk/buildroot/package/Config.in


Changeset:
Modified: trunk/buildroot/package/Config.in
===================================================================
--- trunk/buildroot/package/Config.in	2009-04-29 07:13:20 UTC (rev 26235)
+++ trunk/buildroot/package/Config.in	2009-04-29 07:21:02 UTC (rev 26236)
@@ -100,6 +100,7 @@
 source "package/psmisc/Config.in"
 endif
 source "package/screen/Config.in"
+source "package/shared-mime-info/Config.in"
 source "package/startup-notification/Config.in"
 source "package/strace/Config.in"
 source "package/sudo/Config.in"

Added: trunk/buildroot/package/shared-mime-info/Config.in
===================================================================
--- trunk/buildroot/package/shared-mime-info/Config.in	                        (rev 0)
+++ trunk/buildroot/package/shared-mime-info/Config.in	2009-04-29 07:21:02 UTC (rev 26236)
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_SHARED_MIME_INFO
+	bool "shared-mime-info"
+	select BR2_PACKAGE_LIBGLIB2
+        select BR2_PACKAGE_LIBXML2
+	help
+                The shared-mime-info package contains the core
+                database of common types and the update-mime-database
+                command used to extend it.
+
+                http://freedesktop.org/wiki/Software/shared-mime-info

Added: trunk/buildroot/package/shared-mime-info/shared-mime-info-0.60-fix-xmllint.patch
===================================================================
--- trunk/buildroot/package/shared-mime-info/shared-mime-info-0.60-fix-xmllint.patch	                        (rev 0)
+++ trunk/buildroot/package/shared-mime-info/shared-mime-info-0.60-fix-xmllint.patch	2009-04-29 07:21:02 UTC (rev 26236)
@@ -0,0 +1,17 @@
+---
+ Makefile.am |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: shared-mime-info-0.60/Makefile.am
+===================================================================
+--- shared-mime-info-0.60.orig/Makefile.am
++++ shared-mime-info-0.60/Makefile.am
+@@ -72,7 +72,7 @@
+ 
+ check: freedesktop.org.xml
+ 	if test -n $(XMLLINT) ; then \
+-		xmllint --noout --valid $(top_srcdir)/freedesktop.org.xml;	\
++		$(XMLLINT) --noout --valid $(top_srcdir)/freedesktop.org.xml;	\
+ 	fi
+ 	if test -d CVS/ && test -x ../xdgmime/src/test-mime-data && test -x $(top_builddir)/test-tree-magic ; then \
+ 		mkdir -p $(top_builddir)/temp-mime-dir/mime/packages ; \

Added: trunk/buildroot/package/shared-mime-info/shared-mime-info.mk
===================================================================
--- trunk/buildroot/package/shared-mime-info/shared-mime-info.mk	                        (rev 0)
+++ trunk/buildroot/package/shared-mime-info/shared-mime-info.mk	2009-04-29 07:21:02 UTC (rev 26236)
@@ -0,0 +1,72 @@
+#############################################################
+#
+# shared-mime-info
+#
+#############################################################
+SHARED_MIME_INFO_VERSION = 0.60
+SHARED_MIME_INFO_SOURCE = shared-mime-info-$(SHARED_MIME_INFO_VERSION).tar.bz2
+SHARED_MIME_INFO_SITE = http://freedesktop.org/~hadess
+
+SHARED_MIME_INFO_INSTALL_STAGING = YES
+SHARED_MIME_INFO_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install
+SHARED_MIME_INFO_INSTALL_TARGET = NO
+
+SHARED_MIME_INFO_AUTORECONF = NO
+SHARED_MIME_INFO_CONF_ENV = XMLLINT=$(HOST_DIR)/usr/bin/xmllint
+SHARED_MIME_INFO_DEPENDENCIES = uclibc host-pkgconfig host-libglib2 host-libxml2
+
+SHARED_MIME_INFO_CONF_OPT = --disable-update-mimedb
+
+$(eval $(call AUTOTARGETS,package,shared-mime-info))
+
+
+# shared-mime-info for the host
+SHARED_MIME_INFO_HOST_DIR:=$(BUILD_DIR)/shared-mime-info-$(SHARED_MIME_INFO_VERSION)-host
+SHARED_MIME_INFO_HOST_BINARY:=$(HOST_DIR)/usr/bin/update-mime-database
+
+$(DL_DIR)/$(SHARED_MIME_INFO_SOURCE):
+	$(call DOWNLOAD,$(SHARED_MIME_INFO_SITE),$(SHARED_MIME_INFO_SOURCE))
+
+$(STAMP_DIR)/host_shared-mime-info_unpacked: $(DL_DIR)/$(SHARED_MIME_INFO_SOURCE)
+	mkdir -p $(SHARED_MIME_INFO_HOST_DIR)
+	$(INFLATE$(suffix $(SHARED_MIME_INFO_SOURCE))) $< | \
+		$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(SHARED_MIME_INFO_HOST_DIR) $(TAR_OPTIONS) -
+	toolchain/patch-kernel.sh $(SHARED_MIME_INFO_HOST_DIR) package/shared-mime-info/ \*.patch
+	touch $@
+
+$(STAMP_DIR)/host_shared-mime-info_configured: $(STAMP_DIR)/host_shared-mime-info_unpacked $(STAMP_DIR)/host_pkgconfig_installed
+	(cd $(SHARED_MIME_INFO_HOST_DIR); rm -rf config.cache; \
+		$(HOST_CONFIGURE_OPTS) \
+		CFLAGS="$(HOST_CFLAGS)" \
+		LDFLAGS="$(HOST_LDFLAGS)" \
+		./configure \
+		--prefix="$(HOST_DIR)/usr" \
+		--sysconfdir="$(HOST_DIR)/etc" \
+		--disable-update-mimedb \
+	)
+	touch $@
+
+$(STAMP_DIR)/host_shared-mime-info_compiled: $(STAMP_DIR)/host_shared-mime-info_configured
+	$(MAKE) -C $(SHARED_MIME_INFO_HOST_DIR)
+	touch $@
+
+$(STAMP_DIR)/host_shared-mime-info_installed: $(STAMP_DIR)/host_shared-mime-info_compiled
+	$(HOST_MAKE_ENV) $(MAKE) -C $(SHARED_MIME_INFO_HOST_DIR) install
+	touch $@
+
+host-shared-mime-info: $(STAMP_DIR)/host_shared-mime-info_installed
+
+host-shared-mime-info-source: shared-mime-info-source
+
+host-shared-mime-info-clean:
+	rm -f $(addprefix $(STAMP_DIR)/host_shared-mime-info_,unpacked configured compiled installed)
+	-$(MAKE) -C $(SHARED_MIME_INFO_HOST_DIR) uninstall
+	-$(MAKE) -C $(SHARED_MIME_INFO_HOST_DIR) clean
+
+host-shared-mime-info-dirclean:
+	rm -rf $(SHARED_MIME_INFO_HOST_DIR)
+
+# update the shared-mime-info database in the target
+$(SHARED_MIME_INFO_HOOK_POST_INSTALL): host-shared-mime-info
+	$(SHARED_MIME_INFO_HOST_BINARY) $(STAGING_DIR)/usr/share/mime
+	$(INSTALL) -D $(STAGING_DIR)/usr/share/mime/mime.cache $(TARGET_DIR)/usr/share/mime/mime.cache

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] svn commit: [26236] trunk/buildroot/package: shared-mime-info
  2009-04-29  7:21 [Buildroot] svn commit: [26236] trunk/buildroot/package: shared-mime-info tpetazzoni at uclibc.org
@ 2009-04-29  7:32 ` Peter Korsgaard
  2009-04-29  8:52   ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2009-04-29  7:32 UTC (permalink / raw)
  To: buildroot

>>>>> "tpetazzoni" == tpetazzoni  <tpetazzoni@uclibc.org> writes:

 tpetazzoni> Author: tpetazzoni
 tpetazzoni> Date: 2009-04-29 07:21:02 +0000 (Wed, 29 Apr 2009)
 tpetazzoni> New Revision: 26236

 tpetazzoni> Log:
 tpetazzoni> Add the shared-mime-info package

Thanks.

 >> From Sven Neumann <s.neumann@raumfeld.com>

Don't forget to close the bugtracker issue. It's also nice to mention
the number in the commit message (E.G. closes #299).
 tpetazzoni> +++ trunk/buildroot/package/shared-mime-info/Config.in	2009-04-29 07:21:02 UTC (rev 26236)
 tpetazzoni> @@ -0,0 +1,10 @@
 tpetazzoni> +config BR2_PACKAGE_SHARED_MIME_INFO
 tpetazzoni> +	bool "shared-mime-info"
 tpetazzoni> +	select BR2_PACKAGE_LIBGLIB2
 tpetazzoni> +        select BR2_PACKAGE_LIBXML2

This should be indented with a <tab>

 tpetazzoni> +	help
 tpetazzoni> +                The shared-mime-info package contains the core
 tpetazzoni> +                database of common types and the update-mime-database
 tpetazzoni> +                command used to extend it.
 tpetazzoni> +
 tpetazzoni> +                http://freedesktop.org/wiki/Software/shared-mime-info

And these with <tab><space><space>
 tpetazzoni> +#############################################################
 tpetazzoni> +#
 tpetazzoni> +# shared-mime-info
 tpetazzoni> +#
 tpetazzoni> +#############################################################
 tpetazzoni> +SHARED_MIME_INFO_VERSION = 0.60
 tpetazzoni> +SHARED_MIME_INFO_SOURCE = shared-mime-info-$(SHARED_MIME_INFO_VERSION).tar.bz2
 tpetazzoni> +SHARED_MIME_INFO_SITE = http://freedesktop.org/~hadess
 tpetazzoni> +
 tpetazzoni> +SHARED_MIME_INFO_INSTALL_STAGING = YES
 tpetazzoni> +SHARED_MIME_INFO_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install

That's the same as the default value for _INSTALL_STAGING_OPT, so it
can get removed.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] svn commit: [26236] trunk/buildroot/package: shared-mime-info
  2009-04-29  7:32 ` Peter Korsgaard
@ 2009-04-29  8:52   ` Thomas Petazzoni
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2009-04-29  8:52 UTC (permalink / raw)
  To: buildroot

Le Wed, 29 Apr 2009 09:32:20 +0200,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

> Don't forget to close the bugtracker issue. It's also nice to mention
> the number in the commit message (E.G. closes #299).

Ok, will do next time.

> This should be indented with a <tab>
> 
> And these with <tab><space><space>
> 
> That's the same as the default value for _INSTALL_STAGING_OPT, so it
> can get removed.

Fixed by r26238. Thanks for the review and comments!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-29  8:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-29  7:21 [Buildroot] svn commit: [26236] trunk/buildroot/package: shared-mime-info tpetazzoni at uclibc.org
2009-04-29  7:32 ` Peter Korsgaard
2009-04-29  8:52   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox