1 |
slords |
1.1 |
# |
2 |
|
|
# - Net::OpenVPN::Manage - |
3 |
|
|
# This spec file was automatically generated by cpan2rpm [ver: 2.026] |
4 |
|
|
# The following arguments were used: |
5 |
|
|
# Net::OpenVPN::Manage |
6 |
|
|
# For more information on cpan2rpm please visit: http://perl.arix.com/ |
7 |
|
|
# |
8 |
|
|
|
9 |
|
|
%define pkgname Net-OpenVPN-Manage |
10 |
|
|
%define filelist %{pkgname}-%{version}-filelist |
11 |
|
|
%define NVR %{pkgname}-%{version}-%{release} |
12 |
|
|
%define maketest 1 |
13 |
|
|
|
14 |
|
|
name: perl-Net-OpenVPN-Manage |
15 |
|
|
summary: Net-OpenVPN-Manage - Manage an OpenVPN process via it's management port |
16 |
|
|
version: 0.02 |
17 |
|
|
release: 1 |
18 |
|
|
vendor: Aaron Meyer <meyeaard@meyertech.net> |
19 |
|
|
packager: Arix International <cpan2rpm@arix.com> |
20 |
|
|
license: Artistic |
21 |
|
|
group: Applications/CPAN |
22 |
|
|
url: http://www.cpan.org |
23 |
|
|
buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n) |
24 |
|
|
buildarch: noarch |
25 |
|
|
prefix: %(echo %{_prefix}) |
26 |
|
|
source: http://search.cpan.org/dist/M/ME/MEYEAARD/Net-OpenVPN-Manage-0.02.tar.gz |
27 |
|
|
|
28 |
|
|
%description |
29 |
|
|
This module connects to the OpenVPN management interface, executes |
30 |
|
|
commands on the interface and returns the results or errors that result. |
31 |
|
|
|
32 |
|
|
# |
33 |
|
|
# This package was generated automatically with the cpan2rpm |
34 |
|
|
# utility. To get this software or for more information |
35 |
|
|
# please visit: http://perl.arix.com/ |
36 |
|
|
# |
37 |
|
|
|
38 |
|
|
%prep |
39 |
|
|
%setup -q -n %{pkgname}-%{version} |
40 |
|
|
chmod -R u+w %{_builddir}/%{pkgname}-%{version} |
41 |
|
|
|
42 |
|
|
%build |
43 |
|
|
grep -rsl '^#!.*perl' . | |
44 |
|
|
grep -v '.bak$' |xargs --no-run-if-empty \ |
45 |
|
|
%__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' |
46 |
|
|
CFLAGS="$RPM_OPT_FLAGS" |
47 |
|
|
%{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '` |
48 |
|
|
%{__make} |
49 |
|
|
%if %maketest |
50 |
|
|
%{__make} test |
51 |
|
|
%endif |
52 |
|
|
|
53 |
|
|
%install |
54 |
|
|
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
55 |
|
|
|
56 |
|
|
%{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '` |
57 |
|
|
|
58 |
|
|
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress |
59 |
|
|
|
60 |
|
|
# SuSE Linux |
61 |
|
|
if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ] |
62 |
|
|
then |
63 |
|
|
%{__mkdir_p} %{buildroot}/var/adm/perl-modules |
64 |
|
|
%{__cat} `find %{buildroot} -name "perllocal.pod"` \ |
65 |
|
|
| %{__sed} -e s+%{buildroot}++g \ |
66 |
|
|
> %{buildroot}/var/adm/perl-modules/%{name} |
67 |
|
|
fi |
68 |
|
|
|
69 |
|
|
# remove special files |
70 |
|
|
find %{buildroot} -name "perllocal.pod" \ |
71 |
|
|
-o -name ".packlist" \ |
72 |
|
|
-o -name "*.bs" \ |
73 |
|
|
|xargs -i rm -f {} |
74 |
|
|
|
75 |
|
|
# no empty directories |
76 |
|
|
find %{buildroot}%{_prefix} \ |
77 |
|
|
-type d -depth \ |
78 |
|
|
-exec rmdir {} \; 2>/dev/null |
79 |
|
|
|
80 |
|
|
%{__perl} -MFile::Find -le ' |
81 |
|
|
find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}"); |
82 |
|
|
print ""; |
83 |
|
|
for my $x (sort @dirs, @files) { |
84 |
|
|
push @ret, $x unless indirs($x); |
85 |
|
|
} |
86 |
|
|
print join "\n", sort @ret; |
87 |
|
|
|
88 |
|
|
sub wanted { |
89 |
|
|
return if /auto$/; |
90 |
|
|
|
91 |
|
|
local $_ = $File::Find::name; |
92 |
|
|
my $f = $_; s|^\Q%{buildroot}\E||; |
93 |
|
|
return unless length; |
94 |
|
|
return $files[@files] = $_ if -f $f; |
95 |
|
|
|
96 |
|
|
$d = $_; |
97 |
|
|
/\Q$d\E/ && return for reverse sort @INC; |
98 |
|
|
$d =~ /\Q$_\E/ && return |
99 |
|
|
for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|; |
100 |
|
|
|
101 |
|
|
$dirs[@dirs] = $_; |
102 |
|
|
} |
103 |
|
|
|
104 |
|
|
sub indirs { |
105 |
|
|
my $x = shift; |
106 |
|
|
$x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs; |
107 |
|
|
} |
108 |
|
|
' > %filelist |
109 |
|
|
|
110 |
|
|
[ -z %filelist ] && { |
111 |
|
|
echo "ERROR: empty %files listing" |
112 |
|
|
exit -1 |
113 |
|
|
} |
114 |
|
|
|
115 |
|
|
%clean |
116 |
|
|
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
117 |
|
|
|
118 |
|
|
%files -f %filelist |
119 |
|
|
%defattr(-,root,root) |
120 |
|
|
|
121 |
|
|
%changelog |
122 |
|
|
* Fri Mar 6 2009 root@smedev |
123 |
|
|
- Initial build. |