1
- Name: $name
1
+ Name: glusterfs-hadoop
2
2
Version: $version
3
3
Release: $release
4
4
#if $epoch
@@ -8,72 +8,51 @@ License: Apache
8
8
Summary: GlusterFS Hadoop Plugin
9
9
Group: Application/File
10
10
11
- #set $i = 0
12
- #for $artifact in $all_artifacts
11
+ #for $i, $artifact in $enumerate($all_artifacts)
13
12
Source$i: $artifact
14
- #set $i += 1
15
13
#end for
16
14
17
15
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18
16
BuildArch: noarch
19
17
18
+ # yes, this is /usr/lib even on 64-bit
19
+ %global hadoop_libdir %{_prefix}/lib/hadoop/lib
20
+
20
21
%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.
24
24
25
25
%prep
26
26
27
27
%build
28
28
29
29
%install
30
30
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}
39
33
40
- #set $i = 0
41
- #for $artifact in $all_artifacts
34
+ #for $i, $artifact in $enumerate($all_artifacts)
42
35
#if $artifact.endswith('.jar')
43
36
/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
48
38
#end if
49
- #set $i += 1
50
39
#end for
51
40
52
41
%clean
53
42
rm -rf %{buildroot}
54
43
55
44
%files
56
45
%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)
64
47
#if $artifact.endswith('.jar')
65
48
%{_javadir}/$artifact
66
- #elif $artifact.endswith('.pom')
67
- %{_javadir}/poms/$artifact
68
- #elif $artifact.endswith('.zip')
69
- %{_javadir}/zips/$artifact
49
+ %{hadoop_libdir}/$artifact
70
50
#end if
71
- #set $i += 1
72
51
#end for
73
52
74
53
%changelog
75
- * Fri May 18 2012 Anthony Towns <
[email protected] > - 0.20.2-0
76
- - Initial build
77
54
* Fri Nov 22 2013 Jay Vyas <
[email protected] > 2.1.4
78
55
- Initial import into the glusterfs-hadoop plugin as part of our deployment.
79
56
57
+ * Fri May 18 2012 Anthony Towns <
[email protected] > - 0.20.2-0
58
+ - Initial build
0 commit comments