Skip to content

Commit 4a3f1b0

Browse files
author
Jimmy Tang
committed
Added basic spec file to build an RPM
Some of this may be broken since it's been imported from an svn/git checkout, this needs work. Signed-off-by: Jimmy Tang <jtang@tchpc.tcd.ie>
1 parent 38d71d6 commit 4a3f1b0

5 files changed

Lines changed: 103 additions & 0 deletions

File tree

etc/httpd/conf.d/slurm_php.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#
2+
# Web application to display information about slurm
3+
#
4+
5+
<Directory "/usr/share/php-slurm">
6+
Order Deny,Allow
7+
Deny from all
8+
Allow from all
9+
</Directory>
10+
11+
Alias /slurm /usr/share/php-slurm
12+
Alias /Slurm /usr/share/php-slurm

etc/php.d/slurm_php.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
; Enable slurm_php extension module
2+
extension=slurm_php.so

git-release-head.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
#VERSION=$(git describe)
3+
VERSION=$(git tag -l | tail -1)
4+
DISTNAME=php-slurm
5+
DISTFILE=$DISTNAME-$VERSION
6+
7+
git archive --format tar --prefix $DISTFILE/ HEAD | bzip2 -c > $DISTFILE.tar.bz2
8+
rpmbuild -ts $DISTFILE.tar.bz2

git-release.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
#VERSION=$(git describe)
3+
VERSION=$(git tag -l | tail -1)
4+
DISTNAME=php-slurm
5+
DISTFILE=$DISTNAME-$VERSION
6+
7+
git archive --format tar --prefix $DISTFILE/ $VERSION | bzip2 -c > $DISTFILE.tar.bz2

php-slurm.spec

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Name: php-slurm
2+
Version: 1.0
3+
Release: 6%{?dist}
4+
Summary: PHP extension for SLURM
5+
6+
Group: System
7+
License: GPLv2
8+
#URL: TBD
9+
Source0: php-slurm-1.0.tar.bz2
10+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11+
12+
BuildRequires: slurm-devel >= 2.2.0, php-devel, php-cli
13+
Requires: slurm >= 2.2.0, php, httpd
14+
15+
%description
16+
PHP extension for SLURM.
17+
18+
This is PHP extensions goal is to provide just enough functionality to
19+
a web developer read data from the slurm controller daemon to create
20+
a *status* or *monitoring* application which can be viewed by the
21+
end user. All the code has been written by 'Vermeulen Peter' with
22+
contributions from TCHPC staff.
23+
24+
25+
%prep
26+
%setup -q
27+
28+
29+
%build
30+
phpize
31+
%configure
32+
make %{?_smp_mflags}
33+
34+
35+
%install
36+
rm -rf $RPM_BUILD_ROOT
37+
mkdir -p $RPM_BUILD_ROOT
38+
INSTALL_ROOT=$RPM_BUILD_ROOT make install
39+
install -D etc/php.d/slurm_php.ini $RPM_BUILD_ROOT/etc/php.d/slurm_php.ini
40+
install -D etc/httpd/conf.d/slurm_php.conf $RPM_BUILD_ROOT/etc/httpd/conf.d/slurm_php.conf
41+
42+
%{__mkdir} -p %{buildroot}/%{_datadir}/%{name}
43+
%{__cp} -ad ./examples/* %{buildroot}/%{_datadir}/%{name}
44+
45+
46+
%clean
47+
rm -rf $RPM_BUILD_ROOT
48+
49+
50+
%files
51+
%defattr(-,root,root,-)
52+
%doc README AUTHORS RELEASE_NOTES
53+
%{_libdir}/*
54+
%config(noreplace) %{_sysconfdir}/httpd/conf.d/slurm_php.conf
55+
%config(noreplace) %{_sysconfdir}/php.d/slurm_php.ini
56+
%{_datadir}/%{name}
57+
58+
59+
%changelog
60+
* Tue Apr 12 2011 Jimmy Tang <jtang@tchpc.tcd.ie> - 1.0-6
61+
Update example site to show functionality of module
62+
63+
* Mon Apr 04 2011 Jimmy Tang <jtang@tchpc.tcd.ie> - 1.0-5
64+
Re-organise sample site
65+
66+
* Mon Apr 04 2011 Jimmy Tang <jtang@tchpc.tcd.ie> - 1.0-4
67+
Added example configuration and sample site
68+
69+
* Mon Apr 04 2011 Jimmy Tang <jtang@tchpc.tcd.ie> - 1.0-3
70+
Enable module when rpm is installed
71+
72+
* Fri Apr 01 2011 Jimmy Tang <jtang@tchpc.tcd.ie> - 1.0-2
73+
Initial creation of spec file
74+

0 commit comments

Comments
 (0)