forked from rpm-software-management/rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement autobuild "template" system (prototype)
Remove endless boilerplate to perform the same steps in each package by just declaring which kind of buildsystem the package uses using the new Autobuild: spec tag. Autobuild macros are just regular parametric macros which can be invoked manually from specs too, which should help with reuse and handling complicated cases. As such , this will only work for simple and/or "perfect" upstream projects of course. In reality many/most packages need further tweaking, but this can now be easily done with the new append/prepend modes of the build scriptlets. The implementation looks more complicated than one might expect because we want the full spec processing to take place on these parts, rather than just macro expansion. That covers things like the special facilities of %prep and their side-effects, %if-conditionals, possible error handling and so on. Add automake upstream amhello-1.0.tar.gz as an test-case of a rather hands-free autobuild. Pretending it's a noarch package is ugly, but handling arch-specifity in the test-suite is uglier. Fixes: rpm-software-management#1087
- Loading branch information
Showing
7 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Name: amhello | ||
Version: 1.0 | ||
Release: 1 | ||
Source: %{name}-%{version}.tar.gz | ||
License: GPLv2 | ||
Summary: Autotools example | ||
# This isn't, but to simplify test-suite | ||
BuildArch: noarch | ||
Autobuild: autotools | ||
|
||
%description | ||
%{summary} | ||
|
||
%build -a | ||
cat << EOF > README.distro | ||
Add some distro specific notes. | ||
EOF | ||
|
||
%files | ||
%doc README.distro | ||
%{_bindir}/hello | ||
%{_docdir}/%{name} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters