Initial version
This commit is contained in:
parent
3fc08190cf
commit
d291ea0f3d
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/numad-0.5git.tar.xz
|
84
numad.spec
Normal file
84
numad.spec
Normal file
@ -0,0 +1,84 @@
|
||||
%global systemctl_bin /usr/bin/systemctl
|
||||
|
||||
Name: numad
|
||||
Version: 0.5
|
||||
Release: 1.20120221git%{?dist}
|
||||
Summary: NUMA user daemon
|
||||
|
||||
License: LGPLv2
|
||||
Group: System Environment/Daemons
|
||||
URL: http://git.fedorahosted.org/git/?p=numad.git
|
||||
# The source for this package was pulled from upstream's vcs. Use the
|
||||
# following commands to generate the tarball:
|
||||
# git clone git://git.fedorahosted.org/numad.git numad-0.5git
|
||||
# tar cJf numad-0.5git.tar.xz numad-0.5git/
|
||||
Source0: %{name}-%{version}git.tar.xz
|
||||
# Add parts of code under a different license
|
||||
# This patch is temporary, it's going to be part of upstream code later
|
||||
Patch0: %{name}1.patch
|
||||
|
||||
Requires: systemd-units, initscripts
|
||||
Requires(post): systemd-units, initscripts
|
||||
Requires(preun): systemd-units, initscripts
|
||||
|
||||
ExcludeArch: s390 s390x %{arm}
|
||||
|
||||
%description
|
||||
Numad, a daemon for NUMA (Non-Uniform Memory Architecture) systems,
|
||||
that monitors NUMA characteristics and manages placement of processes
|
||||
and memory to minimize memory latency and thus provide optimum performance.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}git
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
make CFLAGS="-std=gnu99 -g" LDFLAGS="-lpthread"
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
mkdir -p %{buildroot}%{_mandir}/man8/
|
||||
install -p -m 644 numad.conf %{buildroot}%{_sysconfdir}/
|
||||
install -p -m 644 numad.service %{buildroot}%{_unitdir}/
|
||||
make install prefix=%{buildroot}/usr
|
||||
|
||||
%files
|
||||
%{_bindir}/numad
|
||||
%{_unitdir}/numad.service
|
||||
%config(noreplace) %{_sysconfdir}/numad.conf
|
||||
%doc %{_mandir}/man8/numad.8.gz
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ]; then
|
||||
# initial installation
|
||||
%{systemctl_bin} daemon-reload &>/dev/null || :
|
||||
fi
|
||||
|
||||
if [ $1 -eq 2 ]; then
|
||||
# package upgrade
|
||||
if %{systemctl_bin} --quiet is-active numad.service; then
|
||||
%{systemctl_bin} restart numad.service &>/dev/null || :
|
||||
fi
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
# package removal
|
||||
%{systemctl_bin} --no-reload disable numad.service &>/dev/null || :
|
||||
%{systemctl_bin} stop numad.service &>/dev/null || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ]; then
|
||||
# package removal
|
||||
%{systemctl_bin} --system daemon-reload &>/dev/null || :
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Wed Feb 15 2012 Jan Synáček <jsynacek@redhat.com> 0.5-1.20120221git
|
||||
- spec update
|
||||
|
||||
* Fri Feb 10 2012 Bill Burns <bburns@redhat.com> 0.5-1
|
||||
- initial version
|
2058
numad1.patch
Normal file
2058
numad1.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user