merge nico's package/rules.mk and package/templates.mk into one file, update packages...
authorFelix Fietkau <nbd@openwrt.org>
Mon, 9 May 2005 09:33:23 +0000 (09:33 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 9 May 2005 09:33:23 +0000 (09:33 +0000)
SVN-Revision: 817

openwrt/package/fuse/Makefile
openwrt/package/pcre/Makefile
openwrt/package/popt/Makefile
openwrt/package/rules.mk
openwrt/package/shfs/Makefile
openwrt/package/snort/Makefile
openwrt/package/templates.mk [deleted file]

index 1f738d8252895e0dbe4d4a5b67dd8668d750135c..c0dd9c1600618c6ff46a27f32eafb5ada45111e7 100644 (file)
@@ -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
index b5ebd80d792ad1a18c5744bdb3d9cd1d42f6ba34..4e183b2a5eaa9b45695a91e5a87522ef0c7fff43 100644 (file)
@@ -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
index 7297ce7b01fc157ab1d8e92e04d393b08c9ad7f1..64e2e169b7e3ec67560e182064b1896fb8ed35aa 100644 (file)
@@ -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
index ffcbe1acd8abe85d946f1f0ce567acd239b2c8c9..4bbe2e9d6928cf7bf72babb968e88aa62c99cc63 100644 (file)
@@ -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
\ No newline at end of file
+.PHONY: all source prepare compile install clean
index 470e97272424527165ed6a6e5d02f5cab8c7d7a1..b7b90762ed11f346b5daa9ac7d95add5c2296a64 100644 (file)
@@ -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)" \
index aa6f91eae8a220daeca856686d470347c2e2008a..6db6636c918c8fbb6c1a6e12c3972354f082d418 100644 (file)
@@ -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
 
diff --git a/openwrt/package/templates.mk b/openwrt/package/templates.mk
deleted file mode 100644 (file)
index c60d9ce..0000000
+++ /dev/null
@@ -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