1 ## Written 2006 by Martin Bartosch for the OpenXPKI project
2 ## Copyright (C) 2005-2006 by The OpenXPKI Project
5 # - OpenXPKI i18n package -
8 %define pkgname openxpki
-i18n
9 %define filelist
%{pkgname}-%{version}-filelist
10 %define NVR
%{pkgname}-%{version}-%{release}
14 summary
: OpenXPKI Internationalization
17 vendor
: OpenXPKI Project
18 packager
: Martin Bartosch
<m.bartosch@cynops.de
>
20 group
: Applications
/CPAN
21 url
: http
://www.openxpki.org
22 buildroot
: %{_tmppath}/%{name}-%{version}-%
(id
-u
-n
)
23 prefix
: %
(echo %{_prefix})
24 source: openxpki
-i18n
-%{version}.tar.gz
27 OpenXPKI internationalization files.
30 %setup -q
-n
%{pkgname}-%{version}
31 chmod
-R u
+w
%{_builddir}/%{pkgname}-%{version}
40 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
42 %{makeinstall} DESTDIR=%{buildroot}
45 cmd
=/usr
/share
/spec
-helper
/compress_files
46 [ -x $cmd
] || cmd
=/usr
/lib
/rpm
/brp
-compress
50 if [ -e
/etc
/SuSE
-release
-o
-e
/etc
/UnitedLinux
-release
]
55 # remove special files
57 # no empty directories
58 find
%{buildroot}%{_prefix} \
60 -exec rmdir {} \
; 2>/dev
/null
62 %{__perl} -MFile
::Find
-le '
63 find
({ wanted
=> \
&wanted
, no_chdir
=> 1}, "
%{buildroot}"
);
64 #print "%doc CHANGES INSTALL LICENSE README";
65 for my $x
(sort @
dirs, @files
) {
66 push @ret
, $x unless indirs
($x
);
68 print join "\n"
, sort @ret
;
73 local $_
= $File
::Find
::name
;
74 my $f
= $_
; s|^\Q
%{buildroot}\E||
;
76 return $files
[@files
] = $_
if -f $f
;
79 /\Q$d\E
/ && return for reverse sort @INC
;
80 $d
=~
/\Q$_\E
/ && return
81 for qw|
/etc
%_prefix/man
%_prefix/bin
%_prefix/share|
;
88 $x
=~
/^\Q$_\E\
// && $x ne $_
&& return 1 for @
dirs;
94 echo "ERROR
: empty
%files listing"
99 # [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
102 %defattr(-,root
,root
)
105 * Mon Nov
27 2006 m.bartosch@cynops.de