summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-29 01:21:56 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-29 01:21:56 +0000
commitdda0649ef37ceb08df09c0dbc15f27cbdc8285d5 (patch)
treef98e2082480fdb704253335dac8fd6d0b7376559 /scripts
parentb15366186d330d7581ececb5401693674d4ec5e6 (diff)
add a packaging method that installs files into a subdirectory of bin/ instead of an ipkg
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9060 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/metadata.pl2
-rw-r--r--scripts/metadata.pm8
2 files changed, 9 insertions, 1 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index f3d6e9df2..aa5df6fb9 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -361,7 +361,7 @@ sub print_package_config_category($) {
print "\t";
$pkg->{menu} and print "menu";
print "config PACKAGE_".$pkg->{name}."\n";
- print "\t\ttristate \"$title\"\n";
+ print "\t\t".($pkg->{tristate} ? 'tristate' : 'bool')." \"$title\"\n";
print "\t\tdefault y if DEFAULT_".$pkg->{name}."\n";
foreach my $default (split /\s*,\s*/, $pkg->{default}) {
print "\t\tdefault $default\n";
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index f90446298..ff39e346e 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -63,6 +63,7 @@ sub parse_package_metadata($) {
$pkg->{depends} = [];
$pkg->{builddepends} = [];
$pkg->{subdir} = $subdir;
+ $pkg->{tristate} = 1;
$package{$1} = $pkg;
push @{$srcpackage{$src}}, $pkg;
};
@@ -88,6 +89,13 @@ sub parse_package_metadata($) {
push @{$category{$1}->{$src}}, $pkg;
};
/^Description: \s*(.*)\s*$/ and $pkg->{description} = "\t\t $1\n". get_multiline(*FILE, "\t\t ");
+ /^Type: \s*(.+)\s*$/ and do {
+ $pkg->{type} = [ split /\s+/, $1 ];
+ undef $pkg->{tristate};
+ foreach my $type (@{$pkg->{type}}) {
+ $type =~ /ipkg/ and $pkg->{tristate} = 1;
+ }
+ };
/^Config: \s*(.*)\s*$/ and $pkg->{config} = "$1\n".get_multiline(*FILE);
/^Prereq-Check:/ and $pkg->{prereq} = 1;
/^Preconfig:\s*(.+)\s*$/ and do {