Skip to content

Commit a373d7f

Browse files
committed
mikeb's updates
1 parent c24239c commit a373d7f

File tree

1 file changed

+15
-36
lines changed

1 file changed

+15
-36
lines changed

glusterfs-hadoop.spec.tmpl

Lines changed: 15 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Name: $name
1+
Name: glusterfs-hadoop
22
Version: $version
33
Release: $release
44
#if $epoch
@@ -8,72 +8,51 @@ License: Apache
88
Summary: GlusterFS Hadoop Plugin
99
Group: Application/File
1010

11-
#set $i = 0
12-
#for $artifact in $all_artifacts
11+
#for $i, $artifact in $enumerate($all_artifacts)
1312
Source$i: $artifact
14-
#set $i += 1
1513
#end for
1614

1715
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1816
BuildArch: noarch
1917

18+
# yes, this is /usr/lib even on 64-bit
19+
%global hadoop_libdir %{_prefix}/lib/hadoop/lib
20+
2021
%description
21-
The Gluster hadoop FileSystem implemenataion for both hadoop 1x and 2x. This
22-
java plugin for hadoop (i.e. it is added into /usr/lib/hadoop/lib on all nodes
23-
in a cluster) allows MapReduce and YARN to run on top of gluster.
22+
The Gluster Filesystem Hadoop implementation for both Hadoop 1.x and 2.x. This
23+
Java plugin for Hadoop allows MapReduce and YARN to run on top of Gluster.
2424

2525
%prep
2626

2727
%build
2828

2929
%install
3030
rm -rf %{buildroot}
31-
/usr/bin/install -d %{buildroot}%{_javadir}
32-
/usr/bin/install -d %{buildroot}%{_javadir}/poms
33-
/usr/bin/install -d %{buildroot}%{_javadir}/zips
34-
/usr/bin/install -d %{buildroot}%{_javadir}/conf
35-
36-
pwd
37-
find -name core-site.xml
38-
### /usr/bin/install -m 644 conf/core-site.xml %{buildroot}%{_javadir}/conf/core-site.xml
31+
/bin/mkdir -p %{buildroot}%{_javadir}
32+
/bin/mkdir -p %{buildroot}%{hadoop_libdir}
3933

40-
#set $i = 0
41-
#for $artifact in $all_artifacts
34+
#for $i, $artifact in $enumerate($all_artifacts)
4235
#if $artifact.endswith('.jar')
4336
/usr/bin/install -m 644 %{SOURCE$i} %{buildroot}%{_javadir}
44-
#elif $artifact.endswith('.pom')
45-
/usr/bin/install -m 644 %{SOURCE$i} %{buildroot}%{_javadir}/poms
46-
#elif $artifact.endswith('.zip')
47-
/usr/bin/install -m 644 %{SOURCE$i} %{buildroot}%{_javadir}/zips
37+
/bin/ln -s ../../../..%{_javadir}/$artifact %{buildroot}%{hadoop_libdir}/$artifact
4838
#end if
49-
#set $i += 1
5039
#end for
5140

5241
%clean
5342
rm -rf %{buildroot}
5443

5544
%files
5645
%defattr(-,root,root,-)
57-
%dir %{_javadir}/poms
58-
%dir %{_javadir}/zips
59-
%dir %{_javadir}/conf
60-
61-
### %{_javadir}/conf/core-site.xml
62-
#set $i = 0
63-
#for $artifact in $all_artifacts
46+
#for $i, $artifact in $enumerate($all_artifacts)
6447
#if $artifact.endswith('.jar')
6548
%{_javadir}/$artifact
66-
#elif $artifact.endswith('.pom')
67-
%{_javadir}/poms/$artifact
68-
#elif $artifact.endswith('.zip')
69-
%{_javadir}/zips/$artifact
49+
%{hadoop_libdir}/$artifact
7050
#end if
71-
#set $i += 1
7251
#end for
7352

7453
%changelog
75-
* Fri May 18 2012 Anthony Towns <[email protected]> - 0.20.2-0
76-
- Initial build
7754
* Fri Nov 22 2013 Jay Vyas <[email protected]> 2.1.4
7855
- Initial import into the glusterfs-hadoop plugin as part of our deployment.
7956

57+
* Fri May 18 2012 Anthony Towns <[email protected]> - 0.20.2-0
58+
- Initial build

0 commit comments

Comments
 (0)