1 ## Written 2006 by Martin Bartosch for the OpenXPKI project
2 ## Copyright (C) 2005-2006 by The OpenXPKI Project
5 # - OpenXPKI HTML Mason client package -
8 %define pkgname OpenXPKI
-Client
-SCEP
9 %define filelist
%{pkgname}-%{version}-filelist
10 %define NVR
%{pkgname}-%{version}-%{release}
14 name
: perl
-openxpki
-client
-scep
15 summary
: OpenXPKI SCEP Client
- client module
for Perl clients
18 vendor
: OpenXPKI Project
19 packager
: Martin Bartosch
<m.bartosch@cynops.de
>
21 group
: Applications
/CPAN
22 url
: http
://www.openxpki.org
23 buildroot
: %{_tmppath}/%{name}-%{version}-%
(id
-u
-n
)
24 prefix
: %
(echo %{_prefix})
25 source: OpenXPKI
-Client
-SCEP
-%{version}.tar.gz
31 # This package was generated automatically with the cpan2rpm
32 # utility. To get this software or for more information
33 # please visit: http://perl.arix.com/
37 %setup -q
-n
%{pkgname}-%{version}
38 chmod
-R u
+w
%{_builddir}/%{pkgname}-%{version}
41 grep
-rsl '^
#!.*perl' . |
42 grep
-v '.bak$' |xargs
--no
-run
-if-empty \
43 %__perl -MExtUtils
::MakeMaker
-e 'MY
->fixin
(@ARGV
)'
44 CFLAGS
="$RPM_OPT_FLAGS"
45 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}|
if \$ExtUtils
::MakeMaker
::VERSION
=~
/5\
.9[1-6]|
6\
.0[0-5]/ '` _MAKEPL_ARGS_
52 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
54 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
56 install -d
-D
-m
755 %{buildroot}/srv
/www
/openxpki
/cgi
-bin
/scep
57 install -D
-m
755 bin
/scep
%{buildroot}/srv
/www
/openxpki
/cgi
-bin
/scep
/scep
58 install -D
-m
644 eg
/scep.conf
%{buildroot}/etc
/openxpki
/scep.conf
59 tar cf
- htdocs | tar
-C
%{buildroot}/srv
/www
/openxpki
/ -x
-f
-
61 cmd
=/usr
/share
/spec
-helper
/compress_files
62 [ -x $cmd
] || cmd
=/usr
/lib
/rpm
/brp
-compress
66 if [ -e
/etc
/SuSE
-release
-o
-e
/etc
/UnitedLinux
-release
]
68 %{__mkdir_p} %{buildroot}/var
/adm
/perl
-modules
69 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
70 |
%{__sed} -e s+%{buildroot}++g \
71 > %{buildroot}/var/adm/perl-modules/%{name}
74 # remove special files
75 find
%{buildroot} -name "perllocal.pod" \
76 -o
-name ".packlist" \
80 # no empty directories
81 find
%{buildroot}%{_prefix} \
83 -exec rmdir {} \
; 2>/dev
/null
85 %{__perl} -MFile
::Find
-le '
86 find
({ wanted
=> \
&wanted
, no_chdir
=> 1}, "
%{buildroot}"
);
88 for my $x
(sort @
dirs, @files
) {
89 push @ret
, $x unless indirs
($x
);
91 print join "\n"
, sort @ret
;
96 local $_
= $File
::Find
::name
;
97 my $f
= $_
; s|^\Q
%{buildroot}\E||
;
99 return $files
[@files
] = $_
if -f $f
;
102 /\Q$d\E
/ && return for reverse sort @INC
;
103 $d
=~
/\Q$_\E
/ && return
104 for qw|
/etc
%_prefix/man
%_prefix/bin
%_prefix/share|
;
111 $x
=~
/^\Q$_\E\
// && $x ne $_
&& return 1 for @
dirs;
115 [ -z
%filelist ] && {
116 echo "ERROR
: empty
%files listing"
121 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
124 %defattr(-,root
,root
)
126 %attr(0755,root
,openxpki
) /srv
/www
/openxpki
/cgi
-bin
/scep
/scep
127 %config(noreplace
) %attr(0644,root
,openxpki
) /etc
/openxpki
/scep.conf
130 * Mon Nov
27 2006 m.bartosch@cynops.de