2014-07-30 15:03:49 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2007-2014 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:=file
|
2021-12-07 06:10:52 +00:00
|
|
|
PKG_VERSION:=5.41
|
treewide: remove AUTORELEASE
Automatically compute and substitute current values for all
$(AUTORELEASE) instances as this feature is deprecated and shouldn't be
used.
The following temporary change was made to the core:
diff --git a/rules.mk b/rules.mk
index 57d7995d4fa8..f16367de87a8 100644
--- a/rules.mk
+++ b/rules.mk
@@ -429,7 +429,7 @@ endef
abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1))))
COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
-AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))
+AUTORELEASE = $(if $(DUMP),0,$(shell sed -i "s/\$$(AUTORELEASE)/$(call commitcount,1)/" $(CURDIR)/Makefile))
all:
FORCE: ;
And this command used to fix affected packages:
for i in $(cd feeds/packages; git grep -l PKG_RELEASE:=.*AUTORELEASE | \
sed 's^.*/\([^/]*\)/Makefile^\1^';);
do
make package/$i/download
done
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2023-04-21 16:32:27 +00:00
|
|
|
PKG_RELEASE:=2
|
2014-07-30 15:03:49 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2020-06-26 00:34:15 +00:00
|
|
|
PKG_SOURCE_URL:=http://download.openpkg.org/components/cache/file/ \
|
2017-08-04 11:40:53 +00:00
|
|
|
ftp://ftp.astron.com/pub/file/
|
2021-12-07 06:10:52 +00:00
|
|
|
PKG_HASH:=13e532c7b364f7d57e23dfeea3147103150cb90593a57af86c10e4f6e411603f
|
2014-07-30 15:03:49 +00:00
|
|
|
|
2022-03-30 14:36:34 +00:00
|
|
|
PKG_MAINTAINER:=Marko Ratkaj <markoratkaj@gmail.com>
|
2020-02-14 23:54:06 +00:00
|
|
|
PKG_LICENSE:=BSD-2-Clause
|
2014-07-30 15:03:49 +00:00
|
|
|
PKG_LICENSE_FILES:=COPYING
|
|
|
|
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/file/Default
|
|
|
|
TITLE:=File type determination
|
2018-08-08 05:54:01 +00:00
|
|
|
URL:=https://darwinsys.com/file/
|
2014-07-30 15:03:49 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/file
|
2016-01-27 11:14:16 +00:00
|
|
|
$(call Package/file/Default)
|
2014-07-30 15:03:49 +00:00
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
TITLE+= utility
|
|
|
|
DEPENDS:=+libmagic
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libmagic
|
2016-01-27 11:14:16 +00:00
|
|
|
$(call Package/file/Default)
|
2014-07-30 15:03:49 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE+= library
|
2020-02-19 00:44:44 +00:00
|
|
|
DEPENDS:=+zlib +liblzma +libbz2
|
2014-07-30 15:03:49 +00:00
|
|
|
endef
|
|
|
|
|
2019-03-25 03:50:25 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
|
|
|
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
|
|
|
|
|
2014-07-30 15:03:49 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
2020-02-19 00:44:44 +00:00
|
|
|
--enable-bzlib \
|
|
|
|
--enable-xzlib \
|
|
|
|
--enable-zlib \
|
2019-03-25 03:50:25 +00:00
|
|
|
--disable-libseccomp \
|
|
|
|
--disable-rpath \
|
|
|
|
--disable-warnings \
|
|
|
|
--without-pic
|
2014-07-30 15:03:49 +00:00
|
|
|
|
|
|
|
MAKE_PATH := src
|
|
|
|
|
|
|
|
define Build/Compile/magic
|
|
|
|
( cd $(PKG_BUILD_DIR)/magic/Magdir; \
|
|
|
|
for f in `ls`; do \
|
|
|
|
cat $$$${f}; \
|
|
|
|
done \
|
|
|
|
) > $(PKG_BUILD_DIR)/magic/magic
|
|
|
|
endef
|
|
|
|
Hooks/Compile/Post += Build/Compile/magic
|
|
|
|
|
|
|
|
define Build/Install/magic
|
|
|
|
$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/share/file
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/magic/magic $(PKG_INSTALL_DIR)/usr/share/file/
|
|
|
|
endef
|
|
|
|
Hooks/Install/Post += Build/Install/magic
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/magic.h $(1)/usr/include/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libmagic.{a,so*} $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/file/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/file $(1)/usr/bin/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/share/misc
|
|
|
|
$(SED) "/^#/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
|
|
|
|
$(SED) "/^$$$$/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/file/magic $(1)/usr/share/misc/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libmagic/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2017-08-04 11:40:53 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmagic.so.* $(1)/usr/lib/
|
2014-07-30 15:03:49 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,file))
|
|
|
|
$(eval $(call BuildPackage,libmagic))
|