initial import (#1218749)
This commit is contained in:
parent
d5359dea0b
commit
2085d81b15
|
@ -0,0 +1,4 @@
|
|||
*~
|
||||
*.rpm
|
||||
*.tar*
|
||||
results_*/
|
|
@ -0,0 +1,172 @@
|
|||
# Conditional for release and snapshot builds.
|
||||
# Uncomment for release-builds.
|
||||
%global rel_build 1
|
||||
|
||||
# Conditional for bootstrapping new distributions.
|
||||
# Uncomment for bootstrap-builds.
|
||||
%global bootstrap_build 1
|
||||
|
||||
# Settings used for build from snapshots.
|
||||
%{!?rel_build:%global commit a85b2c6a5bf53de97883299a87f61a0bcf6844b7}
|
||||
%{!?rel_build:%global commit_date 20141215}
|
||||
%{!?rel_build:%global shortcommit %(c=%{commit};echo ${c:0:7})}
|
||||
%{!?rel_build:%global gitver git%{commit_date}-%{shortcommit}}
|
||||
%{!?rel_build:%global gitrel .git%{commit_date}.%{shortcommit}}
|
||||
|
||||
# Proper naming for the tarball from github.
|
||||
%global gittar %{name}-%{version}%{!?rel_build:-%{gitver}}.tar.gz
|
||||
|
||||
# Place rpm-macros into proper location.
|
||||
%{!?_macrosdir:%global _macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)}
|
||||
|
||||
# Setup _pkgdocdir if not defined already.
|
||||
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
|
||||
# Are licenses packaged using %%license?
|
||||
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
|
||||
%bcond_without license_dir
|
||||
%else # 0%%{?fedora} >= 21 || 0%%{?rhel} >= 8
|
||||
%bcond_with license_dir
|
||||
%endif # 0%%{?fedora} >= 21 || 0%%{?rhel} >= 8
|
||||
|
||||
# This is a package from a whole suite.
|
||||
%global suite_name yast
|
||||
%global name_suffix devtools
|
||||
%global repo_name %{suite_name}-%{name_suffix}
|
||||
%global src_url https://github.com/%{suite_name}/%{repo_name}
|
||||
|
||||
Name: %{suite_name}2-%{name_suffix}
|
||||
Version: 3.1.30
|
||||
Release: 0.1%{?gitrel}%{?dist}
|
||||
Summary: YaST Development Tools
|
||||
|
||||
License: GPLv2+
|
||||
URL: https://en.opensuse.org/Portal:YaST
|
||||
# Sources for release-builds.
|
||||
%{?rel_build:Source0: %{src_url}/archive/%{repo_name}/master/%{version}.tar.gz#/%{gittar}}
|
||||
# Sources for snapshot-builds.
|
||||
%{!?rel_build:Source0: %{src_url}/archive/%{commit}.tar.gz#/%{gittar}}
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: automake
|
||||
BuildRequires: docbook-style-xsl
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gettext
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: rubygem(redcarpet)
|
||||
BuildRequires: rubygem(yard)
|
||||
|
||||
Requires: %{_bindir}/libtool
|
||||
Requires: %{_bindir}/xsltproc
|
||||
Requires: automake
|
||||
Requires: cmake
|
||||
Requires: docbook-style-xsl
|
||||
Requires: doxygen
|
||||
Requires: emacs-filesystem
|
||||
Requires: filesystem
|
||||
Requires: gettext
|
||||
Requires: redhat-rpm-config
|
||||
Requires: rubygem(redcarpet)
|
||||
Requires: rubygem(yard)
|
||||
|
||||
# Additional requirements after bootstrap.
|
||||
%if 0%{?bootstrap_build} == 0
|
||||
BuildRequires: pkgconfig(%{name})
|
||||
Requires: yast2-filesystem
|
||||
%endif # 0%%{?bootstrap_build} == 0
|
||||
|
||||
%description
|
||||
Common scripts and templates for developing
|
||||
and building YaST2 modules and components.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -qn %{repo_name}-%{?rel_build:%{repo_name}-master-%{version}}%{!?rel_build:%{commit}}
|
||||
|
||||
# Bootstrap autosh*t.
|
||||
./build-tools/scripts/y2autoconf --bootstrap ./build-tools/
|
||||
./build-tools/scripts/y2automake --bootstrap ./build-tools/
|
||||
%{__cat} ./build-tools/aclocal/*.m4 > acinclude.m4
|
||||
%{_bindir}/autoreconf -fiv
|
||||
|
||||
# Fix-up hashbangs.
|
||||
for _file in $(%{__grep} -Rle '#![ \t]*/usr/bin/env' .)
|
||||
do
|
||||
%{__sed} -e '1s~^#![ \t]*%{_bindir}/env[ \t]\+~#!%{_bindir}/~' \
|
||||
< ${_file} > ${_file}.new && \
|
||||
/bin/touch -r ${_file} ${_file}.new && \
|
||||
%{__mv} -f ${_file}.new ${_file}
|
||||
done
|
||||
|
||||
|
||||
%build
|
||||
%configure
|
||||
%make_build
|
||||
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
# Create additionally needed dirs.
|
||||
%{__mkdir} -p %{buildroot}%{?_macrosdir} %{buildroot}%{?_pkgdocdir}
|
||||
|
||||
# Install ChangeLog.
|
||||
%{__cp} -a ./package/yast2-devtools.changes \
|
||||
%{buildroot}%{?_pkgdocdir}/ChangeLog
|
||||
|
||||
# Install additional tools.
|
||||
%{__cp} -a ./mass-tools/y2m %{buildroot}%{_bindir}
|
||||
|
||||
# Move documentation to %%{?_pkgdocdir}.
|
||||
%{__mv} -f %{buildroot}%{_docdir}/packages/yast2-devtools/* \
|
||||
%{buildroot}%{?_pkgdocdir}
|
||||
%{__install} -pm 0644 ./mass-tools/README \
|
||||
%{buildroot}%{?_pkgdocdir}/README.y2m.txt
|
||||
|
||||
# Move rpm-macros to proper dir.
|
||||
%if "0%{?_macrosdir}" != "0%{_sysconfdir}/rpm"
|
||||
%{__mv} -f %{buildroot}%{_sysconfdir}/rpm/* %{buildroot}%{?_macrosdir}
|
||||
%endif # "0%%{?_macrosdir}" != "0%%{_sysconfdir}/rpm"
|
||||
|
||||
# This script gets sourced by external commands, only.
|
||||
%{__chmod} -c 0644 \
|
||||
%{buildroot}%{_datadir}/YaST2/data/devtools/bin/gettextdomains
|
||||
|
||||
# Final clean-up.
|
||||
%{__rm} -rf %{buildroot}%{_docdir}/packages/yast2-devtools \
|
||||
%if %{with license_dir}
|
||||
%{buildroot}%{?_pkgdocdir}/COPYING \
|
||||
%endif # %%{with license_dir}
|
||||
;
|
||||
|
||||
# Softlink duplicate files.
|
||||
%fdupes -s %{buildroot}
|
||||
|
||||
|
||||
%check
|
||||
%{__make} check
|
||||
|
||||
|
||||
%files
|
||||
%if %{with license_dir}
|
||||
%license COPYING
|
||||
%endif # %%{with license_dir}
|
||||
%doc %{?_pkgdocdir}
|
||||
%{_bindir}/y2*
|
||||
%{_datadir}/aclocal/*.m4
|
||||
%{_datadir}/cmake/Modules/*.cmake
|
||||
%{_datadir}/emacs/site-lisp/*
|
||||
%{_datadir}/pkgconfig/%{name}.pc
|
||||
%{_datadir}/vim
|
||||
%{_datadir}/YaST2/*
|
||||
%{?_macrosdir}/macros.%{suite_name}
|
||||
%{_prefix}/lib/YaST2/*
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon May 04 2015 Björn Esser <bjoern.esser@gmail.com> - 3.1.30-0.1
|
||||
- bootstrapping
|
Loading…
Reference in New Issue