Blob Blame History Raw
# Sadness, this directory is hardcoded everywhere
%global _libdir /usr/lib

# SUSE guys use OBS to automatically handle release numbers,
# when rebasing check what they are using on
# http://download.opensuse.org/repositories/openSUSE:/Tools/Fedora_24/src/
# update the obsrel to match the upstream release number
%global obsrel 231.1

Name:           obs-build
Version:        20161025
Release:        %{obsrel}.1%{?dist}.1
Summary:        A generic package build script

License:        (GPLv2 or GPLv3) and GPLv2+
URL:            https://github.com/openSUSE/obs-build

# Tarball retrieved from
# https://build.opensuse.org/package/show/openSUSE:Tools/build
Source0:        %{name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  perl-generators
Requires:       bash, perl, binutils, tar

Provides:       build = %{version}-%{release}
Requires:       %{name}-mkbaselibs = %{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} >= 8
Recommends:     %{name}-mkdrpms = %{version}-%{release}
%endif

%description
This package provides a script for building packages in a chroot environment.
It is commonly used with the Open Build Service as the engine for building
packages for a wide variety of distributions.

%package mkbaselibs
Summary:        Tools to generate base library packages
Provides:       build-mkbaselibs = %{version}-%{release}
AutoReq:        no

%description mkbaselibs
This package contains the parts which may be installed in the inner build
system for generating base library packages.

%package mkdrpms
Summary:        Tools to generate DeltaRPMs
Provides:       build-mkdrpms = %{version}-%{release}
Requires:       deltarpm
Requires:       %{name} = %{version}-%{release}

%description mkdrpms
This package contains the parts which may be installed in the inner build
system for generating DeltaRPM packages.

%prep
%autosetup -n %{name}-%{version} -p1


%build
# Nothing to do here


%install
%make_install
pushd %{buildroot}%{_libdir}/build/configs/
touch default.conf
test -e default.conf
popd

# Install man pages
install -d -m 0755 %{buildroot}%{_mandir}/man1
install -m 0644 build.1* %{buildroot}%{_mandir}/man1/
install -m 0644 unrpm.1* %{buildroot}%{_mandir}/man1/
install -m 0644 vc.1* %{buildroot}%{_mandir}/man1/


%files
%license COPYING
%doc README
%{_bindir}/build
%{_bindir}/buildvc
%{_bindir}/unrpm
%{_libdir}/build
%{_mandir}/man1/build.1*
%{_mandir}/man1/unrpm.1*
%{_mandir}/man1/vc.1*
%exclude %{_libdir}/build/mkbaselibs
%exclude %{_libdir}/build/baselibs*
%exclude %{_libdir}/build/mkdrpms

%files mkbaselibs
%{_libdir}/build/mkbaselibs
%{_libdir}/build/baselibs*

%files mkdrpms
%{_libdir}/build/mkdrpms


%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20161025-231.1.1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Oct 26 2016 Neal Gompa <ngompa13@gmail.com> - 20161025-231.1.1
- Initial import (#1381661)
- Initial packaging based on SUSE and Josef Strzibny's packaging