mirror of https://github.com/hak5/openwrt.git
merge nico's package/rules.mk and package/templates.mk into one file, update packages that use this
SVN-Revision: 817lede-17.01
parent
a8832b617d
commit
f608b95452
|
@ -7,26 +7,19 @@ PKG_VERSION:=2.2.1
|
|||
PKG_RELEASE:=1
|
||||
PKG_MD5SUM:=250d89b9c7b6ecf531df60c67f75737d
|
||||
|
||||
PKG_SOURCE_URL:= \
|
||||
@SF/$(PKG_NAME) \
|
||||
http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
|
||||
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_CAT:=zcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
|
||||
include $(TOPDIR)/package/templates.mk
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
$(eval $(call PKG_template,KMOD_FUSE,kmod-fuse,$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
$(eval $(call PKG_template,LIBFUSE,libfuse,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
$(eval $(call PKG_template,FUSE_UTILS,fuse-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
|
||||
COMPILE_TARGETS += install-dev
|
||||
CLEAN_TARGETS += uninstall-dev
|
||||
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
||||
(cd $(PKG_BUILD_DIR); \
|
||||
rm -rf config.{cache,status} ; \
|
||||
|
@ -83,7 +76,6 @@ $(IPKG_KMOD_FUSE): $(IDIR_KMOD_FUSE)/CONTROL/control $(PKG_BUILD_DIR)/.installed
|
|||
mkdir -p $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION)
|
||||
cp -fpR $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.o \
|
||||
$(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION)/
|
||||
$(RSTRIP_KMOD) $(IDIR_KMOD_FUSE)
|
||||
mkdir -p $(PACKAGE_DIR)
|
||||
$(IPKG_BUILD) $(IDIR_KMOD_FUSE) $(PACKAGE_DIR)
|
||||
|
||||
|
@ -115,3 +107,6 @@ uninstall-dev:
|
|||
rm -rf $(STAGING_DIR)/usr/include/fuse*
|
||||
rm -rf $(STAGING_DIR)/usr/lib/libfuse.{a,so*}
|
||||
rm -rf $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
|
||||
|
||||
install: install-dev
|
||||
clean: uninstall-dev
|
||||
|
|
|
@ -7,23 +7,16 @@ PKG_VERSION:=5.0
|
|||
PKG_RELEASE:=3
|
||||
PKG_MD5SUM:=53976b62032fd5c76678274e5fd196b4
|
||||
|
||||
PKG_SOURCE_URL:= \
|
||||
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ \
|
||||
http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
|
||||
PKG_SOURCE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_CAT:=zcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
|
||||
include $(TOPDIR)/package/templates.mk
|
||||
|
||||
$(eval $(call PKG_template,LIBPCRE,libpcre,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
COMPILE_TARGETS += install-dev
|
||||
CLEAN_TARGETS += uninstall-dev
|
||||
$(eval $(call PKG_template,LIBPCRE,libpcre,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
|
||||
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
||||
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
|
||||
|
@ -90,3 +83,6 @@ uninstall-dev:
|
|||
$(STAGING_DIR)/usr/lib/libpcre* \
|
||||
$(STAGING_DIR)/usr/lib/pkgconfig/libpcre.pc \
|
||||
$(STAGING_DIR)/usr/share/man/man*/pcre* \
|
||||
|
||||
compile: install-dev
|
||||
clean: uninstall-dev
|
||||
|
|
|
@ -16,14 +16,9 @@ PKG_CAT:=zcat
|
|||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
|
||||
include $(TOPDIR)/package/templates.mk
|
||||
|
||||
$(eval $(call PKG_template,LIBPOPT,libpopt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
COMPILE_TARGETS += install-dev
|
||||
CLEAN_TARGETS += uninstall-dev
|
||||
$(eval $(call PKG_template,LIBPOPT,libpopt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
|
||||
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
||||
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
|
||||
|
@ -79,3 +74,6 @@ uninstall-dev:
|
|||
-$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
DESTDIR="$(STAGING_DIR)" \
|
||||
uninstall
|
||||
|
||||
compile: install-dev
|
||||
clean: uninstall-dev
|
||||
|
|
|
@ -1,3 +1,30 @@
|
|||
define PKG_template
|
||||
IPKG_$(1):=$(PACKAGE_DIR)/$(2)_$(3)_$(4).ipk
|
||||
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(2)
|
||||
INFO_$(1):=$(IPKG_STATE_DIR)/info/$(2).list
|
||||
|
||||
ifneq ($(BR2_PACKAGE_$(1)),)
|
||||
compile: $$(IPKG_$(1))
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_$(1)),y)
|
||||
install: $$(INFO_$(1))
|
||||
endif
|
||||
|
||||
$$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared
|
||||
$(SCRIPT_DIR)/make-ipkg-dir.sh $$(IDIR_$(1)) ./ipkg/$(2).control $(3) $(4)
|
||||
for file in conffiles preinst postinst prerm postrm; do \
|
||||
[ -f ./ipkg/$(2).$$$$file ] && cp ./ipkg/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file || true; \
|
||||
done
|
||||
|
||||
$$(INFO_$(1)): $$(IPKG_$(1))
|
||||
$(IPKG) install $$(IPKG_$(1))
|
||||
|
||||
$(2)-clean:
|
||||
rm -f $$(IPKG_$(1))
|
||||
clean: $(2)-clean
|
||||
|
||||
endef
|
||||
|
||||
ifneq ($(strip $(PKG_SOURCE)),)
|
||||
$(DL_DIR)/$(PKG_SOURCE):
|
||||
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
|
||||
|
@ -17,10 +44,10 @@ all: compile
|
|||
|
||||
source: $(DL_DIR)/$(PKG_SOURCE)
|
||||
prepare: $(PKG_BUILD_DIR)/.prepared
|
||||
compile: $(COMPILE_TARGETS)
|
||||
install: $(INSTALL_TARGETS)
|
||||
compile:
|
||||
install:
|
||||
|
||||
clean: $(CLEAN_TARGETS)
|
||||
rm -rf $(PKG_FILES) $(PKG_BUILD_DIR)
|
||||
clean:
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
|
||||
.PHONY: all source prepare compile install clean
|
||||
.PHONY: all source prepare compile install clean
|
||||
|
|
|
@ -7,9 +7,7 @@ PKG_VERSION := 0.35
|
|||
PKG_RELEASE := 2
|
||||
PKG_MD5SUM := 016f49d71bc32eee2b5d11fc1600cfbe
|
||||
|
||||
PKG_SOURCE_URL := \
|
||||
@SF/shfs \
|
||||
http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
|
||||
PKG_SOURCE_URL := @SF/shfs
|
||||
PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_CAT := zcat
|
||||
PKG_SOURCE_DIR :=
|
||||
|
@ -17,13 +15,11 @@ PKG_SOURCE_DIR :=
|
|||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
|
||||
include $(TOPDIR)/package/templates.mk
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
$(eval $(call PKG_template,KMOD_SHFS,kmod-shfs,$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
$(eval $(call PKG_template,SHFS_UTILS,shfs-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.prepared
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
OFLAGS="$(TARGET_CFLAGS)" \
|
||||
|
|
|
@ -7,16 +7,14 @@ PKG_VERSION:=2.3.3
|
|||
PKG_RELEASE:=1
|
||||
PKG_MD5SUM:=06bf140893e7cb120aaa9372d10a0100
|
||||
|
||||
PKG_SOURCE_URL:= \
|
||||
http://www.snort.org/dl/current/ \
|
||||
http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
|
||||
PKG_SOURCE_URL:=http://www.snort.org/dl/current/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_CAT:=zcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
|
||||
include $(TOPDIR)/package/templates.mk
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
PKG_CONFIGURE_OPTS := \
|
||||
--target=$(GNU_TARGET_NAME) \
|
||||
|
@ -144,8 +142,6 @@ $(eval $(call PKG_build,SNORT_MYSQL,snort-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(
|
|||
$(eval $(call PKG_build,SNORT_PGSQL,snort-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
$(eval $(call PKG_build,SNORT_CUSTOM,snort-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
$(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS)
|
||||
touch $(PKG_BUILD_DIR)/.built
|
||||
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# $(call PKG_template,EXAMPLE,example,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||
define PKG_template
|
||||
|
||||
IPKG_$(1):=$(PACKAGE_DIR)/$(2)_$(3)_$(4).ipk
|
||||
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(2)
|
||||
INFO_$(1):=$(IPKG_STATE_DIR)/info/$(2).list
|
||||
|
||||
PKG_FILES += $$(IPKG_$(1))
|
||||
ifneq ($(BR2_PACKAGE_$(1)),)
|
||||
COMPILE_TARGETS += $$(IPKG_$(1))
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_$(1)),y)
|
||||
INSTALL_TARGETS += $$(INFO_$(1))
|
||||
endif
|
||||
|
||||
$$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared
|
||||
$(SCRIPT_DIR)/make-ipkg-dir.sh $$(IDIR_$(1)) ./ipkg/$(2).control $(3) $(4)
|
||||
|
||||
$$(INFO_$(1)): $$(IPKG_$(1))
|
||||
$(IPKG) install $$(IPKG_$(1))
|
||||
|
||||
endef
|
Loading…
Reference in New Issue