summaryrefslogtreecommitdiffstats
path: root/misc/packaging/ninja.spec
diff options
context:
space:
mode:
authorMaxim Kalaev <maximk@il.ibm.com>2012-09-14 10:46:01 (GMT)
committerMaxim Kalaev <maximk@il.ibm.com>2012-09-23 12:37:11 (GMT)
commit1cdfae5a8824cbe7cb583599c92e9d385d5501e4 (patch)
tree5a668656a560868fa912fb549c92cf0a71cd1914 /misc/packaging/ninja.spec
parente4eef72db86cc321a73da03bd7b7a9b2df83b1af (diff)
downloadNinja-1cdfae5a8824cbe7cb583599c92e9d385d5501e4.zip
Ninja-1cdfae5a8824cbe7cb583599c92e9d385d5501e4.tar.gz
Ninja-1cdfae5a8824cbe7cb583599c92e9d385d5501e4.tar.bz2
packaging: refactored rpm building
Now passing through a valid SRPM, working in a standard way.
Diffstat (limited to 'misc/packaging/ninja.spec')
-rw-r--r--misc/packaging/ninja.spec21
1 files changed, 14 insertions, 7 deletions
diff --git a/misc/packaging/ninja.spec b/misc/packaging/ninja.spec
index d513c6d..2f009f6 100644
--- a/misc/packaging/ninja.spec
+++ b/misc/packaging/ninja.spec
@@ -5,6 +5,8 @@ Release: %{rel}%{?dist}
Group: Development/Tools
License: Apache 2.0
URL: https://github.com/martine/ninja
+Source0: %{name}-%{version}-%{release}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
%description
Ninja is yet another build system. It takes as input the interdependencies of files (typically source code and output executables) and
@@ -14,20 +16,25 @@ Ninja joins a sea of other build systems. Its distinguishing goal is to be fast.
which has over 30,000 source files and whose other build systems (including one built from custom non-recursive Makefiles) can take ten
seconds to start building after changing one file. Ninja is under a second.
+%prep
+%setup -q -n %{name}-%{version}-%{release}
+
%build
-# Assuming we've bootstrapped already..
-../ninja manual ninja -C ..
+echo Building..
+./bootstrap.py
+./ninja manual
%install
mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_docdir}
-cp -p ../ninja %{buildroot}%{_bindir}/
-git log --oneline --pretty=format:'%h: %s (%an, %cd)' --abbrev-commit --all > GITLOG
+cp -p ninja %{buildroot}%{_bindir}/
%files
%defattr(-, root, root)
-%doc GITLOG ../COPYING ../README ../doc/manual.html
+%doc COPYING README doc/manual.html
%{_bindir}/*
%clean
-mv %{_topdir}/*.rpm ..
-rm -rf %{_topdir}
+rm -rf %{buildroot}
+
+#The changelog is built automatically from Git history
+%changelog