build: expose ABI version in .packageauxvars
Subdequent commits need this information to resolve the ABI version when computing binary ipk dependencies. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
		| @@ -24,7 +24,8 @@ $(if $(MENU),Menu: $(MENU) | |||||||
| )$(if $(DEFAULT),Default: $(DEFAULT) | )$(if $(DEFAULT),Default: $(DEFAULT) | ||||||
| )$(if $(findstring $(PREREQ_CHECK),1),Prereq-Check: 1 | )$(if $(findstring $(PREREQ_CHECK),1),Prereq-Check: 1 | ||||||
| )Version: $(VERSION) | )Version: $(VERSION) | ||||||
| Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS)) | $(if $(ABI_VERSION),ABIVersion: $(ABI_VERSION) | ||||||
|  | )Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS)) | ||||||
| Conflicts: $(CONFLICTS) | Conflicts: $(CONFLICTS) | ||||||
| Menu-Depends: $(MDEPENDS) | Menu-Depends: $(MDEPENDS) | ||||||
| Provides: $(PROVIDES) | Provides: $(PROVIDES) | ||||||
|   | |||||||
| @@ -238,6 +238,7 @@ sub parse_package_metadata($) { | |||||||
| 		/^Build-Types:\s*(.+)\s*$/ and $src->{buildtypes} = [ split /\s+/, $1 ]; | 		/^Build-Types:\s*(.+)\s*$/ and $src->{buildtypes} = [ split /\s+/, $1 ]; | ||||||
| 		next unless $pkg; | 		next unless $pkg; | ||||||
| 		/^Version: \s*(.+)\s*$/ and $pkg->{version} = $1; | 		/^Version: \s*(.+)\s*$/ and $pkg->{version} = $1; | ||||||
|  | 		/^ABIVersion: \s*(.+)\s*$/ and $pkg->{abiversion} = $1; | ||||||
| 		/^Title: \s*(.+)\s*$/ and $pkg->{title} = $1; | 		/^Title: \s*(.+)\s*$/ and $pkg->{title} = $1; | ||||||
| 		/^Menu: \s*(.+)\s*$/ and $pkg->{menu} = $1; | 		/^Menu: \s*(.+)\s*$/ and $pkg->{menu} = $1; | ||||||
| 		/^Submenu: \s*(.+)\s*$/ and $pkg->{submenu} = $1; | 		/^Submenu: \s*(.+)\s*$/ and $pkg->{submenu} = $1; | ||||||
|   | |||||||
| @@ -516,6 +516,15 @@ sub gen_package_auxiliary() { | |||||||
| 		if ($pkg->{name} && $pkg->{repository}) { | 		if ($pkg->{name} && $pkg->{repository}) { | ||||||
| 			print "Package/$name/subdir = $pkg->{repository}\n"; | 			print "Package/$name/subdir = $pkg->{repository}\n"; | ||||||
| 		} | 		} | ||||||
|  | 		if ($pkg->{name} && defined($pkg->{abiversion})) { | ||||||
|  | 			if ($pkg->{abiversion} =~ m!^(\d{4})-(\d{2})-(\d{2})-[0-9a-f]{7,40}$!) { | ||||||
|  | 				print STDERR "WARNING: Reducing ABI version '$pkg->{abiversion}' of package '$name' to '$1$2$3'\n"; | ||||||
|  | 				print "Package/$name/abiversion = $1$2$3\n"; | ||||||
|  | 			} | ||||||
|  | 			elsif (length $pkg->{abiversion}) { | ||||||
|  | 				print "Package/$name/abiversion = $pkg->{abiversion}\n"; | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jo-Philipp Wich
					Jo-Philipp Wich