p7zip-light: new package
PATCH v2 1/1 p7zip-light: new package
--- package/Config.in | 1 + package/p7zip-light/Config.in | 29 +++++++ package/p7zip-light/p7zip-light-disable-rar.patch | 96 ++++++++++++++++++++++ package/p7zip-light/p7zip-light-trim-install.patch | 34 ++++++++ package/p7zip-light/p7zip-light.mk | 31 +++++++ 5 files changed, 191 insertions(+) create mode 100644 package/p7zip-light/Config.in create mode 100644 package/p7zip-light/p7zip-light-disable-rar.patch create mode 100644 package/p7zip-light/p7zip-light-trim-install.patch create mode 100644 package/p7zip-light/p7zip-light.mk
package/Config.in +1 -0
@@ -13,6 +13,7 @@ source "package/gzip/Config.in" endif source "package/lzop/Config.in" source "package/lzma/Config.in" +source "package/p7zip-light/Config.in" source "package/xz/Config.in" endmenu
package/p7zip-light/Config.in new file +29 -0
@@ -0,0 +1,29 @@ +config BR2_PACKAGE_P7ZIP_LIGHT + bool "p7zip-light" + help + Command-line version of the 7-Zip compressed file archiver + without RAR and GUI support. + + http://p7zip.sourceforge.net/ + +if BR2_PACKAGE_P7ZIP_LIGHT + +config BR2_PACKAGE_P7ZIP_LIGHT_SFX + bool "SFX support" + default n + help + Enable support for creating self-extracting archives. + +config BR2_PACKAGE_P7ZIP_LIGHT_7Z + bool "7z" + default n + help + Build 7z executable. Uses plugins to handle archives. + +config BR2_PACKAGE_P7ZIP_LIGHT_7ZR + bool "7zr" + default n + help + Build 7zr executable. Only supports 7z archives. + +endif
package/p7zip-light/p7zip-light-disable-rar.patch new file +96 -0
96 lines not on this page · raw message
package/p7zip-light/p7zip-light-trim-install.patch new file +34 -0
@@ -0,0 +1,34 @@ +diff -Nur p7zip_9.20.1.orig/install.sh p7zip_9.20.1/install.sh +--- p7zip_9.20.1.orig/install.sh 2011-03-17 06:32:56.000000000 +1100 ++++ p7zip_9.20.1/install.sh 2012-08-12 16:30:30.452439065 +1000 +@@ -104,12 +104,14 @@ + chmod 555 "${DEST_DIR}${DEST_SHARE}/7z.so" + fi + ++:<<DISABLED + if [ -d bin/Codecs ] + then + echo "- installing ${DEST_DIR}${DEST_SHARE}/Codecs" + cp -r bin/Codecs "${DEST_DIR}${DEST_SHARE}/" + chmod 555 "${DEST_DIR}${DEST_SHARE}"/*/* + fi ++DISABLED + + else + if [ -x bin/7za ] +@@ -129,6 +131,7 @@ + fi + fi + ++:<<DISABLED + mkdir -p "${DEST_DIR}${DEST_MAN}/man1" + if [ -d DOCS ] + then +@@ -181,6 +184,7 @@ + find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type d -exec chmod 555 {} \; + find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type f -exec chmod 444 {} \; + fi ++DISABLED + + use_lang="n" +
package/p7zip-light/p7zip-light.mk new file +31 -0
@@ -0,0 +1,31 @@ +############################################################# +# +# p7zip-light +# +############################################################# +P7ZIP_LIGHT_VERSION = 9.20.1 +P7ZIP_LIGHT_SOURCE = p7zip_$(P7ZIP_LIGHT_VERSION)_src_all.tar.bz2 +P7ZIP_LIGHT_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/p7zip +P7ZIP_LIGHT_LICENSE = LGPLv2.1+ +P7ZIP_LIGHT_TARGETS = 7za + +define P7ZIP_LIGHT_BUILD_CMDS + sed -i -e "s|CC=.*|CC=$(TARGET_CC) \$$(ALLFLAGS)|" -e "s|CXX=.*|CXX=$(TARGET_CXX) \$$(ALLFLAGS)|" $(@D)/makefile.machine + $(MAKE) -C $(@D) 7za \ + $(if $(BR2_PACKAGE_P7ZIP_LIGHT_SFX),sfx,) \ + $(if $(BR2_PACKAGE_P7ZIP_LIGHT_7Z),7z,) \ + $(if $(BR2_PACKAGE_P7ZIP_LIGHT_7ZR),7zr,) +endef + +define P7ZIP_LIGHT_INSTALL_TARGET_CMDS + (cd $(@D); \ + make install DEST_DIR=$(TARGET_DIR) DEST_HOME=/usr DEST_MAN=/usr/share/man \ + ) +endef + +define P7ZIP_LIGHT_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/7z{,a,r} + rm -rf $(TARGET_DIR)/usr/lib/p7zip +endef + +$(eval $(generic-package))
Signature · 1 line
1.7.11.3
PATCH v2 1/1 p7zip-light: new package
Le Sun, 12 Aug 2012 16:44:37 +1000,
Jonathan Liu <[email protected]> a ?crit :
Quoted 11 lines
package/p7zip-light/Config.in new file +11
-0+if BR2_PACKAGE_P7ZIP_LIGHT + +config BR2_PACKAGE_P7ZIP_LIGHT_SFX + bool "SFX support" + default n + help + Enable support for creating self-extracting archives. + +config BR2_PACKAGE_P7ZIP_LIGHT_7Z + bool "7z" + default n
package/p7zip-light/Config.in line 29
Quoted 10 lines
package/p7zip-light/Config.in new file +10
-0+ help + Build 7z executable. Uses plugins to handle archives. + +config BR2_PACKAGE_P7ZIP_LIGHT_7ZR + bool "7zr" + default n + help + Build 7zr executable. Only supports 7z archives. + +endif
No need for the "default n", it's the default.
Also, does the package builds and installs something even if all these suboptions are disabled?
package/p7zip-light/p7zip-light-disable-rar.patch
Quoted 5 lines
package/p7zip-light/p7zip-light-disable-rar.patch new file +0
-0
Patch missing description + Signed-off-by.
package/p7zip-light/p7zip-light-trim-install.patch
Quoted 5 lines
package/p7zip-light/p7zip-light-trim-install.patch new file +0
-0
Ditto.
Quoted 6 lines
package/p7zip-light/p7zip-light.mk new file +0
-0
package/p7zip-light/p7zip-light.mk line 10
Quoted 10 lines
package/p7zip-light/p7zip-light.mk new file +10
-0@@ -0,0 +1,31 @@ +############################################################# +# +# p7zip-light +# +############################################################# +P7ZIP_LIGHT_VERSION = 9.20.1 +P7ZIP_LIGHT_SOURCE = p7zip_$(P7ZIP_LIGHT_VERSION)_src_all.tar.bz2 +P7ZIP_LIGHT_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/p7zip +P7ZIP_LIGHT_LICENSE = LGPLv2.1+ +P7ZIP_LIGHT_TARGETS = 7za
This is not used anywhere.
package/p7zip-light/p7zip-light.mk line 13
Quoted 2 lines
package/p7zip-light/p7zip-light.mk new file +2
-0+define P7ZIP_LIGHT_BUILD_CMDS + sed -i -e "s|CC=.*|CC=$(TARGET_CC) \$$(ALLFLAGS)|" -e "s|CXX=.*|CXX=$(TARGET_CXX) \$$(ALLFLAGS)|" $(@D)/makefile.machine
Isn't it easier/more readable to implement a patch that allows passing CC/CXX/CFLAGS/CXXFLAGS on the make command line?
package/p7zip-light/p7zip-light.mk line 17
Quoted 4 lines
package/p7zip-light/p7zip-light.mk new file +4
-0+ $(MAKE) -C $(@D) 7za \ + $(if $(BR2_PACKAGE_P7ZIP_LIGHT_SFX),sfx,) \ + $(if $(BR2_PACKAGE_P7ZIP_LIGHT_7Z),7z,) \ + $(if $(BR2_PACKAGE_P7ZIP_LIGHT_7ZR),7zr,)
You can remove the last comma:
$(if $(BR2_FOO),foo)
Otherwise, looks good.
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com