Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

RPM spec added

  • Loading branch information...
commit d21291ec12ff3211b3ed1ccb000e559046ffa6ea 1 parent 3aab77a
Aleksey Morarash tuxofil authored
Showing with 62 additions and 1 deletion.
  1. +9 −1 Makefile
  2. +53 −0 opensuse.spec-templ
10 Makefile
View
@@ -1,4 +1,6 @@
-.PHONY: install uninstall clean sudoers
+REVISION=`git --no-pager log --max-count=1 --format=format:%h`
+
+.PHONY: install uninstall clean sudoers spec
install: sudoers
install --mode=755 --directory /etc/yabs
@@ -25,4 +27,10 @@ sudoers:
clean:
find . -name '*~' -delete
+ rm --force -- strikead-yabs.spec
+
+spec:
+ cat opensuse.spec-templ | \
+ sed "s/{{REVISION}}/$(REVISION)/" \
+ > strikead-yabs.spec
53 opensuse.spec-templ
View
@@ -0,0 +1,53 @@
+%define realname yabs
+%define revision {{REVISION}}
+
+Name: strikead-%realname
+Version: 0.1
+Release: 1
+License: Proprietary
+Vendor: StrikeAd
+Packager: Aleksey Morarash <aleksey.morarash@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
+BuildArch: noarch
+
+%description
+Build RPM package in clean chrooted environment.
+
+%prep
+%setup -n strikead-%realname-%revision
+
+%build
+
+%install
+
+install --mode=755 --directory \
+ %buildroot%_sysconfdir/%realname \
+ %buildroot%_sysconfdir/sudoers.d \
+ %buildroot%_bindir \
+ %buildroot%_sbindir
+install --mode=644 yabs*.conf repo*.list %buildroot%_sysconfdir/%realname
+install --mode=440 http-auth.conf %buildroot%_sysconfdir/%realname
+install --mode=755 yabs.sh %buildroot%_bindir/%realname
+install --mode=755 yabs-worker.sh %buildroot%_sbindir/%realname-worker
+install --mode=440 sudoers %buildroot%_sysconfdir/sudoers.d/%realname
+
+%files
+%defattr(-,root,root)
+%dir %_sysconfdir/%realname
+%config %_sysconfdir/%realname/*
+%config %_sysconfdir/sudoers.d/*
+%_bindir/*
+%_sbindir/*
+
+%post
+grep --extended-regexp --quiet '^#includedir\s+/etc/sudoers.d\s*$' /etc/sudoers || \
+ echo '#includedir /etc/sudoers.d' >> /etc/sudoers
+
+%changelog
+* Sun Feb 10 2013 Aleksey Morarash <aleksey.morarash@strikead.com> 0.1-1
+- Initial package for OpenSUSE.
+
Please sign in to comment.
Something went wrong with that request. Please try again.