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