mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 20:29:41 +02:00
add proper build depends
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3841 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
fd2ae84776
commit
ae7dab366c
@ -20,7 +20,7 @@ $(STAMP_DIR) $(TARGET_DIR):
|
|||||||
$(MAKE) -C $(patsubst %-clean,%,$@) clean
|
$(MAKE) -C $(patsubst %-clean,%,$@) clean
|
||||||
|
|
||||||
|
|
||||||
.pkgdeps: $(TOPDIR)/.pkginfo FORCE
|
.pkgdeps: $(TOPDIR)/.pkginfo
|
||||||
@$(TOPDIR)/scripts/gen_deps.pl < $< > $@ || rm -f $@
|
@$(TOPDIR)/scripts/gen_deps.pl < $< > $@ || rm -f $@
|
||||||
|
|
||||||
all: compile
|
all: compile
|
||||||
|
@ -5,6 +5,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=ppp
|
PKG_NAME:=ppp
|
||||||
PKG_VERSION:=2.4.3
|
PKG_VERSION:=2.4.3
|
||||||
PKG_RELEASE:=7
|
PKG_RELEASE:=7
|
||||||
|
PKG_BUILDDEP:=libpcap
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
@ -19,7 +20,6 @@ include $(TOPDIR)/package/rules.mk
|
|||||||
define Package/ppp
|
define Package/ppp
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
NEEDS:=libpcap
|
|
||||||
MENU:=1
|
MENU:=1
|
||||||
DEFAULT:=y
|
DEFAULT:=y
|
||||||
TITLE:=PPP daemon
|
TITLE:=PPP daemon
|
||||||
|
@ -49,7 +49,6 @@ define Package/Default
|
|||||||
SECTION:=opt
|
SECTION:=opt
|
||||||
CATEGORY:=Extra packages
|
CATEGORY:=Extra packages
|
||||||
DEPENDS:=
|
DEPENDS:=
|
||||||
NEEDS:=
|
|
||||||
MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
|
MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
|
||||||
SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
|
SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
|
||||||
VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
||||||
@ -92,7 +91,6 @@ define BuildPackage
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
IDEPEND_$(1):=$$(strip $$(DEPENDS))
|
IDEPEND_$(1):=$$(strip $$(DEPENDS))
|
||||||
INEED_$(1):=$$(strip $$(NEEDS))
|
|
||||||
|
|
||||||
DUMPINFO += \
|
DUMPINFO += \
|
||||||
echo "Package: $(1)";
|
echo "Package: $(1)";
|
||||||
@ -110,7 +108,7 @@ define BuildPackage
|
|||||||
DUMPINFO += \
|
DUMPINFO += \
|
||||||
echo "Version: $(VERSION)"; \
|
echo "Version: $(VERSION)"; \
|
||||||
echo "Depends: $$(IDEPEND_$(1))"; \
|
echo "Depends: $$(IDEPEND_$(1))"; \
|
||||||
echo "Needs: $$(INEED_$(1))"; \
|
echo "Build-Depends: $(PKG_BUILDDEP)"; \
|
||||||
echo "Category: $(CATEGORY)"; \
|
echo "Category: $(CATEGORY)"; \
|
||||||
echo "Title: $(TITLE)"; \
|
echo "Title: $(TITLE)"; \
|
||||||
echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g';
|
echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g';
|
||||||
@ -134,8 +132,7 @@ define BuildPackage
|
|||||||
mkdir -p $$(IDIR_$(1))/CONTROL
|
mkdir -p $$(IDIR_$(1))/CONTROL
|
||||||
echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control
|
echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control
|
||||||
echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control
|
echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control
|
||||||
#FIXME: there should be a better way to do it
|
echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control
|
||||||
D="$$(IDEPEND_$(1))"; D="$$$${D}$$$${D:+, }$$(INEED_$(1))"; echo "Depends: $$$${D}" >> $$(IDIR_$(1))/CONTROL/control
|
|
||||||
echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control
|
echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control
|
||||||
echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control
|
echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control
|
||||||
echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control
|
echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control
|
||||||
@ -156,8 +153,6 @@ define BuildPackage
|
|||||||
$$(INFO_$(1)): $$(IPKG_$(1))
|
$$(INFO_$(1)): $$(IPKG_$(1))
|
||||||
$(IPKG) install $$(IPKG_$(1))
|
$(IPKG) install $$(IPKG_$(1))
|
||||||
|
|
||||||
compile-targets: $(PKG_BUILD_DIR)/.dev-installed
|
|
||||||
|
|
||||||
$(1)-clean:
|
$(1)-clean:
|
||||||
rm -f $(PACKAGE_DIR)/$(1)_*
|
rm -f $(PACKAGE_DIR)/$(1)_*
|
||||||
|
|
||||||
@ -259,7 +254,7 @@ else
|
|||||||
prepare: $(PKG_BUILD_DIR)/.prepared
|
prepare: $(PKG_BUILD_DIR)/.prepared
|
||||||
configure: $(PKG_BUILD_DIR)/.configured
|
configure: $(PKG_BUILD_DIR)/.configured
|
||||||
|
|
||||||
compile-targets:
|
compile-targets: $(PKG_BUILD_DIR)/.dev-installed
|
||||||
compile: compile-targets
|
compile: compile-targets
|
||||||
|
|
||||||
install-targets:
|
install-targets:
|
||||||
|
@ -18,8 +18,8 @@ while ($line = <>) {
|
|||||||
defined $pkg{$name} or $pkg{$name} = {};
|
defined $pkg{$name} or $pkg{$name} = {};
|
||||||
$pkg{$name}->{src} = $src;
|
$pkg{$name}->{src} = $src;
|
||||||
};
|
};
|
||||||
$line =~ /^Depends: \s*(.+)\s*$/ and do {
|
$line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do {
|
||||||
my @dep = split /,\s*/, $1;
|
my @dep = split /,\s*/, $2;
|
||||||
$pkg{$name}->{depends} = \@dep;
|
$pkg{$name}->{depends} = \@dep;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,6 @@ sub print_category($) {
|
|||||||
foreach my $depend (@{$pkg->{depends}}) {
|
foreach my $depend (@{$pkg->{depends}}) {
|
||||||
print "\t\tdepends PACKAGE_$depend\n";
|
print "\t\tdepends PACKAGE_$depend\n";
|
||||||
}
|
}
|
||||||
foreach my $need (@{$pkg->{needs}}) {
|
|
||||||
print "\t\tselect PACKAGE_$need\n";
|
|
||||||
}
|
|
||||||
print "\t\thelp\n";
|
print "\t\thelp\n";
|
||||||
print $pkg->{description};
|
print $pkg->{description};
|
||||||
print "\n";
|
print "\n";
|
||||||
@ -66,10 +63,6 @@ while ($line = <>) {
|
|||||||
my @dep = split /,\s*/, $1;
|
my @dep = split /,\s*/, $1;
|
||||||
$pkg->{depends} = \@dep;
|
$pkg->{depends} = \@dep;
|
||||||
};
|
};
|
||||||
$line =~ /^Needs: \s*(.+)\s*$/ and do {
|
|
||||||
my @need = split /,\s*/, $1;
|
|
||||||
$pkg->{needs} = \@need;
|
|
||||||
};
|
|
||||||
$line =~ /^Category: \s*(.+)\s*$/ and do {
|
$line =~ /^Category: \s*(.+)\s*$/ and do {
|
||||||
$pkg->{category} = $1;
|
$pkg->{category} = $1;
|
||||||
defined $category{$1} or $category{$1} = {};
|
defined $category{$1} or $category{$1} = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user