[packages/ninja] - pl - zsh- and emacs- subpackages
qboosh
qboosh at pld-linux.org
Fri Jun 2 23:23:40 CEST 2017
commit 7d89549153dbacdddf7ff088240a62628fe87256
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Jun 2 23:24:42 2017 +0200
- pl
- zsh- and emacs- subpackages
ninja.spec | 120 ++++++++++++++++++++++++++++++++++++++-----------------------
1 file changed, 75 insertions(+), 45 deletions(-)
---
diff --git a/ninja.spec b/ninja.spec
index d9170c9..524b162 100644
--- a/ninja.spec
+++ b/ninja.spec
@@ -1,12 +1,10 @@
-# TODO
-# - zsh completions subpackage
-# - emacs subpackage
#
# Conditional build:
-%bcond_with bootstrap # do bootstrap build
-%bcond_without doc # don't build doc
+%bcond_with bootstrap # do bootstrap build
+%bcond_without doc # HTML documentation
Summary: A small build system with a focus on speed
+Summary(pl.UTF-8): Mały system budowania ukierunkowany na szybkość
Name: ninja
Version: 1.6.0
Release: 1
@@ -19,6 +17,7 @@ URL: http://martine.github.io/ninja/
%{?with_doc:BuildRequires: asciidoc}
BuildRequires: libstdc++-devel
%{!?with_bootstrap:BuildRequires: ninja}
+BuildRequires: python >= 2.0
BuildRequires: rpmbuild(macros) >= 1.673
Obsoletes: ninja-build < 1.0.0-2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -29,40 +28,72 @@ other build systems in two major respects: it is designed to have its
input files generated by a higher-level build system, and it is
designed to run builds as fast as possible.
+%description -l pl.UTF-8
+Ninja to mały system budowania ukierunkowany na szybkość. Różni się od
+innych systemów budowania pod dwoma głównymi względami: jest
+zaprojektowany, aby przyjmować pliki wejściowe wygenerowane przez
+system budowania wyższego poziomu oraz tak, aby budowanie przebiegało
+jak najszybciej.
+
+%package doc
+Summary: Manual for Ninja build system
+Summary(pl.UTF-8): Podręcznik do systemu budowania Ninja
+Group: Documentation
+# noarch subpackages only when building with rpm5
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
+
+%description doc
+Manual for Ninja build system.
+
+%description doc -l pl.UTF-8
+Podręcznik do systemu budowania Ninja.
+
%package -n bash-completion-%{name}
-Summary: bash-completion for %{name}
+Summary: Bash completion for ninja command
+Summary(pl.UTF-8): Bashowe dopełnianie parametrów polecenia ninja
Group: Applications/Shells
-Requires: %{name}
+Requires: %{name} = %{version}-%{release}
Requires: bash-completion >= 2.0
%if "%{_rpmversion}" >= "5"
BuildArch: noarch
%endif
%description -n bash-completion-%{name}
-bash-completion for %{name}.
+Bash completion for ninja command.
-%package doc
-Summary: Manual for %{name}
-Summary(fr.UTF-8): Documentation pour %{name}
-Summary(it.UTF-8): Documentazione di %{name}
-Summary(pl.UTF-8): Podręcznik dla %{name}
-Group: Documentation
-# noarch subpackages only when building with rpm5
+%description -n bash-completion-%{name} -l pl.UTF-8
+Bashowe dopełnianie parametrów polecenia ninja.
+
+%package -n zsh-completion-%{name}
+Summary: zsh completion for ninja command
+Summary(pl.UTF-8): Dopełnianie parametrów polecenia ninja dla powłoki zsh
+Group: Applications/Shells
+Requires: %{name} = %{version}-%{release}
+Requires: zsh
%if "%{_rpmversion}" >= "5"
BuildArch: noarch
%endif
-%description doc
-Documentation for %{name}.
+%description -n zsh-completion-%{name}
+zsh completion for ninja command.
-%description doc -l fr.UTF-8
-Documentation pour %{name}.
+%description -n zsh-completion-%{name} -l pl.UTF-8
+Dopełnianie parametrów polecenia ninja dla powłoki zsh.
-%description doc -l it.UTF-8
-Documentazione di %{name}.
+%package -n emacs-ninja-mode
+Summary: Ninja mode for Emacs
+Summary(pl.UTF-8): Tryb Ninja dla Emacsa
+Group: Applications/Editors
+Requires: %{name} = %{version}-%{release}
+Requires: emacs
-%description doc -l pl.UTF-8
-Dokumentacja do %{name}.
+%description -n emacs-ninja-mode
+Ninja mode for Emacs.
+
+%description -n emacs-ninja-mode -l pl.UTF-8
+Tryb Ninja dla Emacsa.
%prep
%setup -q
@@ -70,35 +101,34 @@ Dokumentacja do %{name}.
%build
export CXX="%{__cxx}"
-export CFLAGS="%{rpmcflags}"
+export CFLAGS="%{rpmcxxflags}"
-%if %{with bootstrap}
-./configure.py --bootstrap
-export PATH=$(pwd):$PATH
-%else
-./configure.py
+./configure.py \
+ %{?with_bootstrap:--bootstrap} \
+ --verbose
+
+%if %{without bootstrap}
ninja -v
%endif
# build manual
-%{?with_doc:ninja -v manual}
+%{?with_doc:./ninja -v manual}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_bindir}
-# TODO: Install ninja_syntax.py?
+
install -p %{name} $RPM_BUILD_ROOT%{_bindir}
+# TODO: Install ninja_syntax.py as python module?
install -d $RPM_BUILD_ROOT%{bash_compdir}
cp -p misc/bash-completion $RPM_BUILD_ROOT%{bash_compdir}/%{name}
-%if 0
-install -p -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
+install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
install -p misc/ninja-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ninja-mode.el
-install -p -d $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
+install -d $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
install -p misc/zsh-completion $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions/_ninja
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -108,20 +138,20 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING README
%attr(755,root,root) %{_bindir}/ninja
-%files -n bash-completion-%{name}
-%defattr(644,root,root,755)
-%{bash_compdir}/%{name}
-
%if %{with doc}
%files doc
%defattr(644,root,root,755)
%doc doc/manual.html
%endif
-%if 0
-# emacs
-%{_datadir}/emacs/site-lisp/ninja-mode.el
+%files -n bash-completion-%{name}
+%defattr(644,root,root,755)
+%{bash_compdir}/ninja
-# zsh does not have a -filesystem package
-%{_datadir}/zsh/
-%endif
+%files -n zsh-completion-%{name}
+%defattr(644,root,root,755)
+%{_datadir}/zsh/site-functions/_ninja
+
+%files -n emacs-ninja-mode
+%defattr(644,root,root,755)
+%{_datadir}/emacs/site-lisp/ninja-mode.el
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ninja.git/commitdiff/7d89549153dbacdddf7ff088240a62628fe87256
More information about the pld-cvs-commit
mailing list