libtar: add package

This commit is contained in:
CN_SZTL 2020-03-08 18:18:27 +08:00
parent 018ea78507
commit 6b3cec6df3
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
4 changed files with 94 additions and 1 deletions

View File

@ -35,7 +35,9 @@ qntfs-driver source: [lbbboy/qntfs-driver](https://github.com/lbbboy/qntfs-drive
lua-maxminddb source: [jerrykuku/lua-maxminddb](https://github.com/jerrykuku/lua-maxminddb).<br/>
package openwrt-mwol: [Mleaf/openwrt-mwol](https://github.com/Mleaf/openwrt-mwol).<br/>
package gargoyle: [ericpaulbishop/gargoyle](https://github.com/ericpaulbishop/gargoyle).<br/>
luci-app-qos-gargoyle source: [kuoruan/luci-app-qos-gargoyle](https://github.com/kuoruan/luci-app-qos-gargoyle).
luci-app-qos-gargoyle source: [kuoruan/luci-app-qos-gargoyle](https://github.com/kuoruan/luci-app-qos-gargoyle).<br/>
luci-app-cupsd source: [F-Light/luci-app-cupsd](https://github.com/F-Light/luci-app-cupsd).<br/>
libtar source: [ElonH/ootoc-OpenWRT](https://github.com/ElonH/ootoc-OpenWRT).
## License
### Depending on their own License.

View File

@ -0,0 +1,65 @@
####
# File: /Makefile
# Project: libtar
# File Created: Saturday, 7th March 2020 6:57:51 pm
# Author: ElonH[EH](elonhhuang@gmail.com)
# License: GNU General Public License v3.0 or later(http://www.gnu.org/licenses/gpl-3.0-standalone.html)
# Copyright (C) 2020 [ElonH]
####
include $(TOPDIR)/rules.mk
PKG_NAME:=libtar
PKG_VERSION:=1.2.20
PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ElonH/libtar.git
PKG_MIRROR_HASH:=6ba99fe56d83ec6a8f8be0448383f49426a6a9290c3296f3f7d5b2d2c71cdb45
PKG_SOURCE_VERSION:=987a29eaf8c68f8a502dd3880c58e0e1ef99d6a7
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_LICENSE:=GPLv3
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=ElonH <elonhhuang@gmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS+= --enable-shared=yes --enable-static=no
define Package/libtar
SECTION:=lib
CATEGORY:=Libraries
URL:=https://github.com/ElonH/libtar
TITLE:=libtar - C library for manipulating tar files
DEPENDS:=+zlib
endef
define Package/libtar/description
libtar is a library for manipulating tar files from within C programs.
Here are some of its features:
* Handles both POSIX tar file format and the GNU extensions.
* API provides functions for easy use, such as tar_extract_all().
* Also provides functions for more granular use, such as
tar_append_regfile().
endef
define Package/libtar/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libtar $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
endef
$(eval $(call BuildPackage,libtar))

View File

@ -0,0 +1,12 @@
diff --git a/configure.ac b/configure.ac
index 3ebdf51..e8db2c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,7 @@ AC_FUNC_STRFTIME
COMPAT_FUNC_STRLCPY
COMPAT_FUNC_STRMODE
COMPAT_FUNC_STRSEP
+AC_DEFINE([_FORTIFY_STDIO_H], [1], [disable fortify])
dnl ### Check for libraries. #######################################
AC_ARG_WITH([zlib],

View File

@ -0,0 +1,14 @@
diff --git a/libtar/libtar.c b/libtar/libtar.c
index 23f8741..e8d9d73 100644
--- a/libtar/libtar.c
+++ b/libtar/libtar.c
@@ -10,6 +10,9 @@
** University of Illinois at Urbana-Champaign
*/
+#include <stdio.h>
+#include <stdlib.h>
+
#include <config.h>
#include <libtar.h>