-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
William GARCIA
committed
Dec 1, 2015
1 parent
37947bd
commit 48056ac
Showing
6 changed files
with
135 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist | ||
dpkg* | ||
.vagrant |
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,21 @@ | ||
MIT License (MIT) | ||
|
||
Copyright (c) 2015 William Garcia | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,25 @@ | ||
BASE := start-stop-daemon | ||
NAME := $(BASE) | ||
VERSION := $(shell grep Version: $(NAME).spec | tr -s " "| cut -d " " -f 2) | ||
PKG_SOURCE := http://http.debian.net/debian/pool/main/d/dpkg/dpkg_$(VERSION).tar.xz | ||
|
||
default: | ||
yum-builddep -y -t start-stop-daemon.spec | ||
rpmbuild -ba \ | ||
--define "_topdir $(PWD)/dist" \ | ||
--define "buildroot $(PWD)/dist/BUILDROOT" \ | ||
--clean \ | ||
$(NAME).spec | ||
|
||
clean: | ||
rm -rf dpkg* dist | ||
|
||
install: clean | ||
wget $(PKG_SOURCE) | ||
tar -xf dpkg_$(VERSION).tar.xz | ||
tar -czf dpkg_$(VERSION).tar.gz dpkg-$(VERSION)/ | ||
mkdir -p dist/{BUILD,RPMS,SPECS,SOURCES,SRPMS,install} | ||
mv dpkg_$(VERSION).tar.gz dist/SOURCES | ||
|
||
|
||
.PHONY: install clean default |
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 |
---|---|---|
@@ -1 +1,20 @@ | ||
# start-stop-daemon | ||
# buildrpm start-stop-daemon | ||
|
||
This project provides the start-stop-daemon utility. | ||
|
||
## Build | ||
|
||
``` | ||
vagrant up | ||
``` | ||
|
||
The RPM file can be found in `[/vagrant/]dist/RPMS/x86_64/start-stop-daemon-1.18.2-1.el6.x86_64.rpm` | ||
|
||
## Dev | ||
|
||
``` | ||
vagrant ssh | ||
cd /vagrant | ||
make install | ||
make | ||
``` |
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,14 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure(2) do |config| | ||
config.vm.box = "chef/centos-6.5" | ||
config.ssh.username="root" | ||
config.ssh.username="vagrant" | ||
config.vm.provision "shell", inline: <<-SHELL | ||
sudo yum install -y install xz rpm-build yum-utils wget tar | ||
cd /vagrant | ||
make install | ||
make | ||
SHELL | ||
end |
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,52 @@ | ||
%define debug_package %{nil} | ||
|
||
Name: start-stop-daemon | ||
Version: 1.18.2 | ||
Release: 1%{?dist} | ||
Summary: Start and stop system daemon programs | ||
Group: System Environment/Daemons | ||
License: GPL2 | ||
Source: dpkg_%{version}.tar.gz | ||
Prefix: %{_prefix} | ||
Packager: William Garcia | ||
BuildRequires: tar | ||
BuildRequires: make | ||
BuildRequires: gcc | ||
BuildRequires: ncurses-devel | ||
BuildRequires: ncurses | ||
|
||
%description | ||
start-stop-daemon is used to control the creation and termination of | ||
system-level processes. Using one of the matching options, | ||
start-stop-daemon can be configured to find existing instances of a | ||
running process. | ||
|
||
%prep | ||
%setup -q -n dpkg-%{version} | ||
|
||
%build | ||
./configure | ||
make -C lib/compat | ||
make -C utils | ||
|
||
%install | ||
rm -rf $RPM_BUILD_ROOT | ||
|
||
%{__mkdir} -p "%{buildroot}/%{_prefix}/share/man/man8" | ||
%{__cp} -aR "man/start-stop-daemon.8" "%{buildroot}/%{_prefix}/share/man/man8/" | ||
|
||
%{__mkdir} -p "%{buildroot}/%{_sbindir}" | ||
%{__cp} -aR "utils/start-stop-daemon" "%{buildroot}/%{_sbindir}/start-stop-daemon" | ||
|
||
%clean | ||
rm -rf $RPM_BUILD_ROOT | ||
|
||
%files | ||
%defattr(-,root,root) | ||
%{_prefix}/share/man/man8/start-stop-daemon.8.gz | ||
%defattr(755,root,root) | ||
%{_sbindir}/start-stop-daemon | ||
|
||
%changelog | ||
* Tue Aug 19 2015 William Garcia <[email protected]> | ||
- Initial version |