Revision 6514,
1.2 KB
checked in by yasumichi, 12 years ago
(diff) |
install perl modules to vender dir.
|
Rev | Line | |
---|
[4939] | 1 | # |
---|
| 2 | # Plugin for Perl package |
---|
| 3 | # |
---|
| 4 | # vi:syntax=sh |
---|
| 5 | # |
---|
| 6 | |
---|
| 7 | # |
---|
| 8 | # output dependency |
---|
| 9 | # |
---|
| 10 | OutputDependency() |
---|
| 11 | { |
---|
| 12 | cat >> ${SPECFILE} << 'EOL' |
---|
| 13 | # Dependency |
---|
| 14 | Requires: perl |
---|
| 15 | Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) |
---|
| 16 | |
---|
| 17 | BuildRequires: perl |
---|
| 18 | |
---|
| 19 | EOL |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | # |
---|
| 23 | # Output build section |
---|
| 24 | # |
---|
| 25 | OutputBuild() |
---|
| 26 | { |
---|
| 27 | echo '%build' >> ${SPECFILE} |
---|
[6514] | 28 | echo '%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"' >> ${SPECFILE} |
---|
| 29 | echo '%{__make} %{?_smp_mflags}' >> ${SPECFILE} |
---|
[4939] | 30 | echo '' >> ${SPECFILE} |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | # |
---|
| 34 | # Output install section |
---|
| 35 | # |
---|
| 36 | OutputInstall() |
---|
| 37 | { |
---|
| 38 | cat >> ${SPECFILE} << 'EOL' |
---|
| 39 | %install |
---|
| 40 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
[6514] | 41 | %{__make} pure_install DESTDIR=${RPM_BUILD_ROOT} |
---|
[4939] | 42 | |
---|
[6514] | 43 | # remove unnecessary files. |
---|
| 44 | find ${RPM_BUILD_ROOT} -type f -name perllocal.pod -exec %{__rm} -f {} ';' |
---|
| 45 | find ${RPM_BUILD_ROOT} -type f -name .packlist -exec %{__rm} -f {} ';' |
---|
| 46 | find ${RPM_BUILD_ROOT}%{_mandir} -type f -exec %{__rm} -f {} ';' |
---|
| 47 | find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; |
---|
| 48 | |
---|
| 49 | # generate file list |
---|
[4939] | 50 | find $RPM_BUILD_ROOT%{_prefix} -type f -print | |
---|
[6514] | 51 | sed "s@^$RPM_BUILD_ROOT@@g" > %{name}.files |
---|
[4939] | 52 | |
---|
| 53 | if [ "$(cat %{name}.files)X" = "X" ] ; then |
---|
| 54 | echo "ERROR: EMPTY FILE LIST" |
---|
| 55 | exit -1 |
---|
| 56 | fi |
---|
| 57 | |
---|
[5487] | 58 | EOL |
---|
[4939] | 59 | } |
---|
| 60 | |
---|
Note: See
TracBrowser
for help on using the repository browser.