diff options
author | Andrew Lewman <andrew@torproject.org> | 2006-02-16 21:53:18 +0000 |
---|---|---|
committer | Andrew Lewman <andrew@torproject.org> | 2006-02-16 21:53:18 +0000 |
commit | fab7268bf0a0bdd779116bc3cafd61d30dfcec83 (patch) | |
tree | 5530a5c77ededb17f0e84a6db3c1db395fba83be /tor.spec.in | |
parent | fc2522dd0250f3e1732470ca83c0cf17e8c8d132 (diff) | |
download | tor-fab7268bf0a0bdd779116bc3cafd61d30dfcec83.tar.gz tor-fab7268bf0a0bdd779116bc3cafd61d30dfcec83.zip |
Implement first version of the ability to target arch and OS in rpm
builds. This also implements the resulting dist-rpm filename to match the
target arch.
svn:r6023
Diffstat (limited to 'tor.spec.in')
-rw-r--r-- | tor.spec.in | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tor.spec.in b/tor.spec.in index 7fb2856cf0..18bffbbafe 100644 --- a/tor.spec.in +++ b/tor.spec.in @@ -15,6 +15,13 @@ %define toruser @TORUSER@ %define torgroup @TORGROUP@ +## Target a specific arch and OS +# +# default is i386 linux +%define target gnu +%define target_cpu i386 +%define target_os linux + ## Version song and dance # # This should be the Tor version number, as it appears on the tarball, @@ -25,6 +32,11 @@ %define version %(echo %{native_version} | sed -e 's/-/./g') +## Define output filename +# +# This creates filenames based upon the value of target_cpu defined above +%define _build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%{target_cpu}.rpm + ## Release and OS identification song and dance # # This identifies the lineage of the spec file. This file is the @@ -144,7 +156,10 @@ for high-stakes anonymity. %setup -q -n %{name}-%{native_version} %build -%configure --with-tor-user=%{toruser} --with-tor-group=%{torgroup} +%configure --with-tor-user=%{toruser} --with-tor-group=%{torgroup} \ + --build=%{target_cpu}-pc-%{target_os}-%{target} \ + --host=%{target_cpu}-pc-%{target_os}-%{target} \ + --target=%{target_cpu}-pc-%{target_os}-%{target} %make %install |