diff options
Diffstat (limited to 'tools/lzop')
-rw-r--r-- | tools/lzop/Makefile | 33 | ||||
-rw-r--r-- | tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch | 24 |
2 files changed, 57 insertions, 0 deletions
diff --git a/tools/lzop/Makefile b/tools/lzop/Makefile new file mode 100644 index 0000000000..65bd7fe67c --- /dev/null +++ b/tools/lzop/Makefile @@ -0,0 +1,33 @@ +# +# Copyright (C) 2022 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lzop +PKG_VERSION:=1.04 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.lzop.org/download/ +PKG_HASH:=7e72b62a8a60aff5200a047eea0773a8fb205caf7acbe1774d95147f305a2f41 + +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING + +CMAKE_BINARY_SUBDIR:=openwrt-build + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/cmake.mk + +CMAKE_HOST_OPTIONS += \ + -DENABLE_DOCS=ON \ + -DBUILD_TESTING=OFF + +define Host/Uninstall + rm -f $(STAGING_DIR_HOST)/bin/lzop +endef + +$(eval $(call HostBuild)) diff --git a/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch b/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch new file mode 100644 index 0000000000..01ebd33a39 --- /dev/null +++ b/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch @@ -0,0 +1,24 @@ +--- a/CMakeLists.txt 2017-08-10 04:19:45.000000000 -0700 ++++ b/CMakeLists.txt 2022-11-28 17:21:03.453548350 -0800 +@@ -50,6 +50,9 @@ + + project(lzop VERSION 1.04 LANGUAGES C) + ++# configuration options ++option(ENABLE_DOCS "Install documentation." ON) ++ + # install directories + if(NOT CMAKE_INSTALL_PREFIX) + message(FATAL_ERROR "ERROR: CMAKE_INSTALL_PREFIX is not defined.") +@@ -186,9 +189,11 @@ + + install(TARGETS lzop DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}") + ++if(ENABLE_DOCS) + set(f AUTHORS COPYING NEWS README THANKS doc/lzop.html doc/lzop.man doc/lzop.pod doc/lzop.ps doc/lzop.tex doc/lzop.txt) + install(FILES ${f} DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}") + install(FILES doc/lzop.1 DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man1") ++endif() # ENABLE_DOCS + + endif() # CMAKE_INSTALL_FULL_LIBDIR + |