Line | |
---|
1 | # |
---|
2 | # Plugin for Perl package |
---|
3 | # |
---|
4 | # vi:syntax=sh |
---|
5 | # |
---|
6 | |
---|
7 | source ${pluginsdir}/Perl |
---|
8 | |
---|
9 | # |
---|
10 | # output dependency |
---|
11 | # |
---|
12 | OutputDependency() |
---|
13 | { |
---|
14 | OutputDependency_common |
---|
15 | echo >> ${SPECFILE} |
---|
16 | } |
---|
17 | |
---|
18 | # |
---|
19 | # Output build section |
---|
20 | # |
---|
21 | OutputBuild() |
---|
22 | { |
---|
23 | echo '%build' >> ${SPECFILE} |
---|
24 | echo '%{__perl} Build.PL' >> ${SPECFILE} |
---|
25 | echo './Build' >> ${SPECFILE} |
---|
26 | echo '' >> ${SPECFILE} |
---|
27 | } |
---|
28 | |
---|
29 | # |
---|
30 | # Output install section |
---|
31 | # |
---|
32 | OutputInstall() |
---|
33 | { |
---|
34 | cat >> ${SPECFILE} << 'EOL' |
---|
35 | %install |
---|
36 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
37 | PERL_INSTALL_ROOT=${RPM_BUILD_ROOT} ./Build install |
---|
38 | |
---|
39 | # remove unnecessary files. |
---|
40 | find ${RPM_BUILD_ROOT} -type f -name perllocal.pod -exec %{__rm} -f {} ';' |
---|
41 | find ${RPM_BUILD_ROOT} -type f -name .packlist -exec %{__rm} -f {} ';' |
---|
42 | if [ -d ${RPM_BUILD_ROOT}%{_mandir} ]; then |
---|
43 | find ${RPM_BUILD_ROOT}%{_mandir} -type f -exec %{__rm} -f {} ';' |
---|
44 | fi |
---|
45 | find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; |
---|
46 | |
---|
47 | # generate file list |
---|
48 | find $RPM_BUILD_ROOT -type f -print | |
---|
49 | sed "s@^$RPM_BUILD_ROOT@@g" > %{name}.files |
---|
50 | |
---|
51 | if [ "$(cat %{name}.files)X" = "X" ] ; then |
---|
52 | echo "ERROR: EMPTY FILE LIST" |
---|
53 | exit -1 |
---|
54 | fi |
---|
55 | |
---|
56 | EOL |
---|
57 | } |
---|
58 | |
---|
Note: See
TracBrowser
for help on using the repository browser.