-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from systemd/erlang-sd_notify-7
Add spec for Centos
- Loading branch information
Showing
5 changed files
with
112 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FINAL_OUTPUT_DIR=FINAL_RPMS | ||
|
||
|
||
|
||
VERSION=0.12 | ||
|
||
# Directory names | ||
RPM_BUILD_DIR=rpm-build | ||
PKG_NAME=erlang-sd_notify | ||
RPM_SOURCE_DIR=$(PKG_NAME)-$(VERSION) | ||
|
||
TOP_DIR=$(shell pwd) | ||
|
||
TARBALL_DIR=$(TOPDIR) | ||
SOURCE_TGZ=$(PKG_NAME)-$(VERSION).tar.gz | ||
TARGET_DIR=$(TARGET_TOP)/usr/lib/erlang/lib/sd_notify-$(VERSION) | ||
|
||
|
||
DEFINES=--define '_topdir $(TOP_DIR)' --define '_tmppath $(TOP_DIR)/tmp' --define '_sysconfdir /etc' --define '_localstatedir /var' | ||
|
||
rpm: clean erlang-sd_notify | ||
|
||
prepare: | ||
mkdir -p BUILD SOURCES SPECS SRPMS RPMS tmp dist $(TARBALL_DIR) | ||
tar czf $(TARBALL_DIR)/$(SOURCE_TGZ) -C $(TOPDIR) src/ c_src/ rebar.config LICENSE | ||
cp $(TOPDIR)/$(SOURCE_TGZ) SOURCES | ||
rm $(TOPDIR)/$(SOURCE_TGZ) | ||
cp erlang-sd_notify.spec SPECS | ||
|
||
erlang-sd_notify: prepare | ||
mkdir -p $(FINAL_OUTPUT_DIR) | ||
rpmbuild -vvv -bb --nodeps SPECS/erlang-sd_notify.spec $(DEFINES) | ||
find RPMS -name "*.rpm" -exec sh -c 'mv {} `echo {} | sed 's#^RPMS\/noarch#$(FINAL_OUTPUT_DIR)#'`' ';' | ||
|
||
clean: | ||
rm -rf BUILDROOT BUILD SOURCES SPECS SRPMS RPMS tmp $(FINAL_OUTPUT_DIR) dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
%global realname sd_notify | ||
%global upstream systemd | ||
%global upstream_version 0.12 | ||
|
||
|
||
|
||
Name: erlang-%{realname} | ||
Version: %{upstream_version} | ||
Release: 1%{?dist} | ||
Summary: Erlang interface to systemd notify subsystem | ||
License: MIT | ||
URL: https://github.com/%{upstream}/%{realname} | ||
VCS: scm:git:https://github.com/%{upstream}/%{realname}.git | ||
Source0: https://github.com/%{upstream}/%{realname}/archive/%{version}/erlang-%{realname}-%{version}.tar.gz | ||
Source1: erlang-sd_notify-rebar.config | ||
BuildRequires: erlang-rebar | ||
BuildRequires: systemd-devel | ||
%{?__erlang_nif_version:Requires: %{__erlang_nif_version}} | ||
|
||
|
||
%description | ||
%{summary}. | ||
|
||
%prep | ||
%setup -c . | ||
|
||
%build | ||
rebar compile | ||
|
||
|
||
%install | ||
mkdir -p $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/{ebin,priv} | ||
install -m 644 -p ebin/%{realname}.app $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin | ||
install -m 644 -p ebin/%{realname}.beam $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin | ||
install -m 755 -p priv/%{realname}_drv.so $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/priv | ||
|
||
|
||
%files | ||
%doc LICENSE | ||
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/ | ||
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin/ | ||
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/priv/ | ||
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app | ||
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.beam | ||
%{_libdir}/erlang/lib/%{realname}-%{version}/priv/%{realname}_drv.so | ||
|
||
|
||
%changelog | ||
* Sat Oct 29 2016 Gabriele Santomaggio <[email protected]> - 0.12 | ||
- build for 0.12 | ||
|
||
* Wed Jun 17 2015 Fedora Release Engineering <[email protected]> - 0.1-6 | ||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild | ||
|
||
* Tue Nov 04 2014 Peter Lemenkov <[email protected]> - 0.1-5 | ||
- Rebuild with Erlang 17.3.3 | ||
|
||
* Thu Oct 2 2014 John Eckersberg <[email protected]> - 0.1-4 | ||
- Explicitly link shared library with libsystemd (#1148604) | ||
|
||
* Thu Aug 28 2014 Peter Lemenkov <[email protected]> - 0.1-3 | ||
- Rebuild with Erlang 17.2.1 | ||
|
||
* Sat Aug 16 2014 Fedora Release Engineering <[email protected]> | ||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild | ||
|
||
* Tue Jun 03 2014 Peter Lemenkov <[email protected]> - 0.1-1 | ||
- initial build | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters