Revision 5487,
1.1 KB
checked in by yasumichi, 13 years ago
(diff) |
update method to treat unnecessary files.
|
Line | |
---|
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} |
---|
28 | echo 'perl Makefile.PL' >> ${SPECFILE} |
---|
29 | echo '%{__make}' >> ${SPECFILE} |
---|
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} |
---|
41 | %{__make} install DESTDIR=${RPM_BUILD_ROOT} |
---|
42 | |
---|
43 | find $RPM_BUILD_ROOT%{_prefix} -type f -print | |
---|
44 | sed "s@^$RPM_BUILD_ROOT@@g" | |
---|
45 | grep -v ^%{_mandir} | |
---|
46 | grep -v perllocal.pod | |
---|
47 | grep -v "\.packlist" > %{name}.files |
---|
48 | |
---|
49 | if [ "$(cat %{name}.files)X" = "X" ] ; then |
---|
50 | echo "ERROR: EMPTY FILE LIST" |
---|
51 | exit -1 |
---|
52 | fi |
---|
53 | |
---|
54 | # remove unnecessary files. |
---|
55 | %{__rm} ${RPM_BUILD_ROOT}%{perl_archlib}/perllocal.pod |
---|
56 | find ${RPM_BUILD_ROOT} -type f -name .packlist -exec %{__rm} -f {} ';' |
---|
57 | find ${RPM_BUILD_ROOT}%{_mandir} -type f -exec %{__rm} -f {} ';' |
---|
58 | |
---|
59 | EOL |
---|
60 | } |
---|
61 | |
---|
Note: See
TracBrowser
for help on using the repository browser.