Commit 790d24ae authored by mh's avatar mh
Browse files

initial commit

parents
Pipeline #9052 passed with stages
in 1 minute and 26 seconds
---
stages:
- build
- push
.build_rpm:
stage: build
tags:
- rpmbuild
image: $CI_REGISTRY/immerda/container-images/rpmbuild/centos:${RELEASE}
script:
- sudo -u user spectool -g -S -R rubygem-lockfile.spec
- ibuild-rpm rubygem-lockfile.spec
artifacts:
expire_in: 1 day
paths:
- "*.rpm"
- checksums
.push_rpm:
stage: push
tags:
- rpmbuild
image: $CI_REGISTRY/immerda/container-images/rpmbuild/centos:$RELEASE
script:
- ipush "el${RELEASE}"
- echo -e "Hi\nThere are new RPMs availabe to be signed for ${CI_PROJECT_URL} on EL${RELEASE}\nHave a look at the pipeline ${CI_PIPELINE_URL}\n\nChecksums:\n\n$(cat checksums)" | imail "New RPM built for ${CI_PROJECT_NAME}"
build_el7:
variables:
RELEASE: 7
extends: .build_rpm
build_el8:
variables:
RELEASE: 8
extends: .build_rpm
push_el7:
needs:
- build_el7
variables:
RELEASE: 7
extends: .push_rpm
push_el8:
needs:
- build_el8
variables:
RELEASE: 8
extends: .push_rpm
# Generated from lockfile-2.1.3.gem by gem2rpm -*- rpm-spec -*-
%global gem_name lockfile
Name: rubygem-%{gem_name}
Version: 2.1.3
Release: 1%{?dist}
Summary: lockfile
Group: Development/Languages
License: Ruby
URL: https://github.com/ahoward/lockfile
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildArch: noarch
%description
a ruby library for creating perfect and NFS safe lockfiles.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
# Create the gem as gem install only works on a gem file
gem build %{gem_name}.gemspec
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{_bindir}
cp -pa .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
# Run the test suite
%check
pushd .%{gem_instdir}
popd
%files
%dir %{gem_instdir}
%{_bindir}/rlock
%{gem_instdir}/bin
%{gem_libdir}
%{gem_instdir}/rakefile
%{gem_instdir}/samples
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README
%doc %{gem_instdir}/doc
%{gem_instdir}/lockfile.gemspec
%doc %{gem_instdir}/readme.erb
%changelog
* Sat Sep 26 2015 mh <mh@immerda.ch> - 2.1.3-1
- Initial package
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment