OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 30-Apr-2005 12:33:59 Branch: HEAD Handle: 2005043011335900 Modified files: openpkg-src/file file.spec Log: add optional Perl API Summary: Revision Changes Path 1.52 +37 -5 openpkg-src/file/file.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/file/file.spec ============================================================================ $ cvs diff -u -r1.51 -r1.52 file.spec --- openpkg-src/file/file.spec 24 Mar 2005 11:18:45 -0000 1.51 +++ openpkg-src/file/file.spec 30 Apr 2005 10:33:59 -0000 1.52 @@ -22,6 +22,10 @@ ## SUCH DAMAGE. ## +# package version +%define V_api_c 4.13 +%define V_api_pl 0.82 + # package information Name: file Summary: Automatic File Content Type Recognition Tool @@ -32,11 +36,15 @@ Class: BASE Group: Filesystem License: BSD -Version: 4.13 -Release: 20050210 +Version: %{V_api_c} +Release: 20050430 + +# package options +%option with_perl no # list of sources -Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz +Source0: ftp://ftp.astron.com/pub/file/file-%{V_api_c}.tar.gz +Source1: http://www.cpan.org/modules/by-module/File/File-LibMagic-%{V_api_pl}.tgz # build information Prefix: %{l_prefix} @@ -45,6 +53,10 @@ PreReq: OpenPKG, openpkg >= 20040130 BuildPreReq: zlib PreReq: zlib +%if "%{with_perl}" == "yes" +BuildPreReq: perl, perl-openpkg +PreReq: perl +%endif AutoReq: no AutoReqProv: no @@ -54,13 +66,19 @@ %track prog file = { - version = %{version} + version = %{V_api_c} url = ftp://ftp.astron.com/pub/file/ regex = file-(__VER__)\.tar\.gz } + prog file:File-LibMagic = { + version = %{V_api_pl} + url = http://www.cpan.org/modules/by-module/File/ + regex = File-LibMagic-(__VER__)\.tgz + } %prep %setup -q + %setup -q -D -T -a 1 %build ACLOCAL=true \ @@ -76,12 +94,26 @@ --disable-shared \ --disable-nls %{l_make} %{l_mflags} +%if "%{with_perl}" == "yes" + %{l_shtool} subst \ + -e 's;-I\.;-I. -I../src;g' \ + -e 's;-lmagic;-L../src/.libs -lmagic %{l_ldflags} -lz;' \ + File-LibMagic-%{V_api_pl}/Makefile.PL + %{l_prefix}/bin/perl-openpkg prepare + %{l_prefix}/bin/perl-openpkg -d File-LibMagic-%{V_api_pl} configure build +%endif %install rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" +%if "%{with_perl}" == "yes" + %{l_prefix}/bin/perl-openpkg -d File-LibMagic-%{V_api_pl} install + %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup +%else + >perl-openpkg-files +%endif strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true - %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files` %files -f files @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org