cdrkit: new package
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 2 Mar 2010 21:32:52 +0000 (22:32 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 9 Apr 2010 09:03:55 +0000 (11:03 +0200)
Supported both for the target and the host. Will be used by the root
filesystem generation code, thanks to genisoimage.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/Config.in
package/cdrkit/Config.in [new file with mode: 0644]
package/cdrkit/cdrkit.mk [new file with mode: 0644]

index f3f42139cb97c1fd7bd735b87ca810bf7e6e511b..0dac9498f2f23d3c0790c811f9b765203ef1edd6 100644 (file)
@@ -146,6 +146,7 @@ endmenu
 
 menu "Hardware handling"
 source "package/acpid/Config.in"
+source "package/cdrkit/Config.in"
 source "package/cramfs/Config.in"
 source "package/dbus/Config.in"
 source "package/dbus-glib/Config.in"
diff --git a/package/cdrkit/Config.in b/package/cdrkit/Config.in
new file mode 100644 (file)
index 0000000..2e25581
--- /dev/null
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_CDRKIT
+       # Needed for libbz
+       select BR2_PACKAGE_BZIP2
+       select BR2_PACKAGE_LIBCAP
+       bool "cdrkit"
+       help
+         cdrkit is a suite of programs for recording CDs and DVDs,
+         blanking CD-RW media, creating ISO-9660 filesystem images,
+         extracting audio CD data, and more.
+
+        http://www.cdrkit.org/
diff --git a/package/cdrkit/cdrkit.mk b/package/cdrkit/cdrkit.mk
new file mode 100644 (file)
index 0000000..a6a2e80
--- /dev/null
@@ -0,0 +1,63 @@
+CDRKIT_VERSION=1.1.10
+CDRKIT_SOURCE=cdrkit-$(CDRKIT_VERSION).tar.gz
+CDRKIT_SITE=http://www.cdrkit.org/releases/
+
+CDRKIT_DEPENDENCIES=libcap bzip2 host-cmake
+HOST_CDRKIT_DEPENDENCIES=host-libcap host-cmake host-bzip2
+
+ifeq ($(BR2_ENDIAN),"BIG")
+CMAKE_ENDIAN_OPT=-DBITFIELDS_HTOL=1
+else
+CMAKE_ENDIAN_OPT=-DBITFIELDS_HTOL=0
+endif
+
+define CDRKIT_CONFIGURE_CMDS
+ -mkdir $(@D)/build
+ (cd $(@D)/build ; \
+       $(HOST_DIR)/usr/bin/cmake .. \
+               -Wno-dev \
+               -DCMAKE_SYSTEM_NAME:STRING="Linux" \
+               -DCMAKE_C_COMPILER:FILEPATH="$(TARGET_CC)" \
+               -DCMAKE_CXX_COMPILER:FILEPATH="$(TARGET_CXX)" \
+               -DCMAKE_C_FLAGS:STRING="$(TARGET_CFLAGS)" \
+               -DCMAKE_EXE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
+               -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
+               -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
+               -DCMAKE_FIND_ROOT_PATH:PATH="$(STAGING_DIR)" \
+               -DCMAKE_INSTALL_PREFIX:PATH="$(TARGET_DIR)/usr" \
+               $(CMAKE_ENDIAN_OPT) \
+ )
+endef
+
+define CDRKIT_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build
+endef
+
+define CDRKIT_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build install
+endef
+
+define HOST_CDRKIT_CONFIGURE_CMDS
+ -mkdir $(@D)/build
+ (cd $(@D)/build ; \
+       $(HOST_DIR)/usr/bin/cmake .. \
+               -Wno-dev \
+               -DCMAKE_C_FLAGS="$(HOST_CFLAGS)" \
+               -DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
+               -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
+               -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
+               -DCMAKE_INSTALL_PREFIX:STRING="$(HOST_DIR)/usr" \
+ )
+endef
+
+define HOST_CDRKIT_BUILD_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build
+endef
+
+define HOST_CDRKIT_INSTALL_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build  install
+endef
+
+$(eval $(call GENTARGETS,package,cdrkit))
+$(eval $(call GENTARGETS,package,cdrkit,host))
+