$(call Build/Compile)
touch $$@
+ $(PKG_BUILD_DIR)/.dev-installed: $(PKG_BUILD_DIR)/.built
+ $(call Build/InstallDev)
+ touch $$@
+
package-clean: FORCE
$(call Build/Clean)
+ $(call Build/UninstallDev)
package-rebuild: FORCE
@-rm $(PKG_BUILD_DIR)/.built
SECTION:=opt
CATEGORY:=Extra packages
DEPENDS:=
+ NEEDS:=
MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
endif
IDEPEND_$(1):=$$(strip $$(DEPENDS))
+ INEED_$(1):=$$(strip $$(NEEDS))
DUMPINFO += \
echo "Package: $(1)";
DUMPINFO += \
echo "Version: $(VERSION)"; \
echo "Depends: $$(IDEPEND_$(1))"; \
+ echo "Needs: $$(INEED_$(1))"; \
echo "Category: $(CATEGORY)"; \
echo "Title: $(TITLE)"; \
echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g';
$$(INFO_$(1)): $$(IPKG_$(1))
$(IPKG) install $$(IPKG_$(1))
+ compile-targets: $(PKG_BUILD_DIR)/.dev-installed
+
$(1)-clean:
rm -f $(PACKAGE_DIR)/$(1)_*
[ -x configure ] && \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
+ LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
+ --program-prefix="" \
+ --program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(call Build/Compile/Default,)
endef
+define Build/InstallDev
+endef
+
define Build/Clean
$(MAKE) clean
endef
+define Build/UninstallDev
+endef
+
ifneq ($(DUMP),)
dumpinfo: FORCE
@$(DUMPINFO)
foreach my $depend (@{$pkg->{depends}}) {
print "\t\tdepends PACKAGE_$depend\n";
}
+ foreach my $need (@{$pkg->{needs}}) {
+ print "\t\tselect PACKAGE_$need\n";
+ }
print "\t\thelp\n";
print $pkg->{description};
print "\n";
my @dep = split /,\s*/, $1;
$pkg->{depends} = \@dep;
};
+ $line =~ /^Needs: \s*(.+)\s*$/ and do {
+ my @need = split /,\s*/, $1;
+ $pkg->{needs} = \@need;
+ };
$line =~ /^Category: \s*(.+)\s*$/ and do {
$pkg->{category} = $1;
defined $category{$1} or $category{$1} = {};