Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
90 lines (74 sloc) 3.29 KB
%define realname yabs
%define version {{VERSION}}
%define revision {{REVISION}}
%define release {{RELEASE}}
Name: strikead-%realname
Version: %version
Release: %release
License: Proprietary
Vendor: StrikeAd
Packager: Andrii Radyk <andrii.radyk@strikead.com>
Group: Development/Languages/Erlang
Source: strikead-%realname.tar.gz
Summary: RPM builder script
URL: https://github.com/strikead/%realname/tarball/%revision
Requires: sudo zypper createrepo util-linux sed coreutils curl tar gzip bzip2 unzip rpm rpm-build git
BuildArch: noarch
%description
Build RPM package in clean chrooted environment.
%prep
%setup -n strikead-%realname-%revision
%build
%install
# prepare skeleton
install --mode=755 --directory \
%buildroot%_sysconfdir/%realname \
%buildroot%_sysconfdir/sudoers.d \
%buildroot%_bindir \
%buildroot%_sbindir
# install yabs configs
install --mode=644 etc/yabs/yabs*.conf %buildroot%_sysconfdir/%realname
install --mode=644 etc/yabs/repo*.list %buildroot%_sysconfdir/%realname
# install yabs http github config
install --mode=440 http-auth.conf %buildroot%_sysconfdir/%realname
# install yabs and yabs worker
install --mode=755 yabs.sh %buildroot%_bindir/%realname
install --mode=755 yabs-worker.sh %buildroot%_sbindir/%realname-worker
# support legacy naming
ln -fs %_bindir/%realname %buildroot%_bindir/%realname-131
ln -fs %_sysconfdir/%realname/yabs-stable-122.conf %buildroot%_sysconfdir/%realname/yabs.conf
ln -fs %_sysconfdir/%realname/yabs-unstable-122.conf %buildroot%_sysconfdir/%realname/yabs-unstable.conf
ln -fs %_sysconfdir/%realname/yabs-experimental-122.conf %buildroot%_sysconfdir/%realname/yabs-experimental.conf
ln -fs %_sysconfdir/%realname/yabs-stable-131.conf %buildroot%_sysconfdir/%realname/yabs-131.conf
ln -fs %_sysconfdir/%realname/yabs-stable-132.conf %buildroot%_sysconfdir/%realname/yabs-132.conf
# install sudoers for yabs
install --mode=440 sudoers %buildroot%_sysconfdir/sudoers.d/%realname
%files
%defattr(-,root,root)
%dir %_sysconfdir/%realname
%config %_sysconfdir/%realname/http-auth.conf
%config %_sysconfdir/sudoers.d/*
%config %_sysconfdir/%realname/*.conf
%config %_sysconfdir/%realname/*.list
%_bindir/*
%_sbindir/*
%changelog
* Mon Jan 2 2017 Vladyslav Boridko <vladyslav.boridko@strikead.com> 1.8.0
- [EN-7718] Add sbt credentials
* Fri Jul 3 2016 Andrii Radyk <andrii.radyk@strikead.com> 1.3.0
- [EN-2003] refactoring and adding environment specific dependency check with rpm macros support
* Fri Jul 10 2015 Andrii Radyk <andrii.radyk@strikead.com> 1.0.0
- [EN-2003] merge yabs for suse 12.2 and suse 13.1 and refactoring
* Mon Mar 16 2015 Andrii Radyk <andrii.radyk@strikead.com> 0.8-1
- [EN-867] add unstable profiles to yabs
* Mon Mar 4 2013 Aleksey Morarash <aleksey.morarash@strikead.com> 0.7-1
- Switched to local RPM repos mirror.
* Tue Feb 26 2013 Aleksey Morarash <aleksey.morarash@strikead.com> 0.6-2
- Switched to our RPM repo mirror.
* Mon Feb 18 2013 Aleksey Morarash <aleksey.morarash@strikead.com> 0.5-1
- use home:ldan86 repo with libcgal9;
- umount filesystems from chroot after successfull build;
- create random/urandom devices;
- Built for OpenSUSE 12.2.
* Sun Feb 10 2013 Aleksey Morarash <aleksey.morarash@strikead.com> 0.1-1
- Initial package for OpenSUSE.