pax_global_header00006660000000000000000000000064105533143010014105gustar00gitgit0000000000000052 comment=3f5ec4c9254884920e3d29eff1965fd3e4f8cae9 rpm-build-fpc-2.1/000075500000000000000000000000001055331430100134065ustar00gitgit00000000000000rpm-build-fpc-2.1/.gear-rules000064400000000000000000000000071055331430100154520ustar00gitgit00000000000000tar: . rpm-build-fpc-2.1/README.ALT000064400000000000000000000037001055331430100147050ustar00gitgit00000000000000This package provides fpc.req and fpc.prov scripts that produce dependencies for Free Pascal *.ppu units. The scripts use ppudump(1) utility to extract information from *.ppu files. The dependency format is fpc(unit) = PPUVer-CRC or fpc-win32(unit) = PPUVer-CRC where PPUVer is unit file format version and CRC is unit interface checksum. This package also provides rpm macros file to facilitate building Free Pascal extensions. The basic macros are %fpc_build %fpc_install %fpc_files *-linux unit and %fpc_build_win32 %fpc_install_win32 %fpc_files *-win32 unit Whenever these macros are used, they adjust rpm internals so that fpc.req and fpc.prov scripts are invoked automatically. To invoke the scripts without rpm, consider that they take the list of files from standard input, one file per line. This, the following should work: $ /usr/lib/rpm/fpc.req <<< /usr/lib/fpc/units/i386-linux/rtl/baseunix.ppu fpc(system) = 2465C1A7 fpc(unixtype) = 9E54A8B2 $ /usr/lib/rpm/fpc.prov <<< /usr/lib/fpc/units/i386-linux/rtl/baseunix.ppu fpc(baseunix) = DB31A855 $ and also $ ls /usr/lib/fpc/units/i386-linux/rtl/*.ppu |/usr/lib/rpm/fpc.req |head fpc(baseunix) = DB31A855 fpc(classes) = 3BF9A432 fpc(cpu) = 84B1694E fpc(cthreads) = 9B9D5BEE fpc(ctypes) = 336D6375 fpc(cwstring) = C62DE08C fpc(dl) = 1E9357BA fpc(dos) = DF52240D fpc(dynlibs) = CC617D5A fpc(errors) = 0BF5B765 $ ls /usr/lib/fpc/units/i386-linux/rtl/*.ppu |/usr/lib/rpm/fpc.prov |head fpc(baseunix) = DB31A855 fpc(charset) = BCA9EE60 fpc(classes) = 3BF9A432 fpc(cmem) = 8128B256 fpc(cpu) = 84B1694E fpc(crt) = 6C7A4FDE fpc(cthreads) = 9B9D5BEE fpc(ctypes) = 336D6375 fpc(cwstring) = C62DE08C fpc(dateutils) = 7F4403C7 $ TODO: extract C library dependencies. $ ppudump -vhim /usr/lib/fpc/units/i386-linux/rtl/*.ppu |grep -i ^'Link other .* lib:' |sort -u Link other shared lib: c (always ) Link other shared lib: dl (always ) Link other shared lib: ncurses (always ) Link other shared lib: tinfo (always ) $ rpm-build-fpc-2.1/fpc.macros000064400000000000000000000016621055331430100153710ustar00gitgit00000000000000%fpc_global() %{expand:%%{?!fpc_%1:%%global %1 %2 %%%1%%global fpc_%1 %2}} %fpc_macro %([ -x %_rpmlibdir/fpc.req ])%{fpc_global __find_requires %_rpmlibdir/fpc.req}%{fpc_global __find_provides %_rpmlibdir/fpc.prov} %fpc_dir %fpc_macro%_libdir/fpc %fpc_make make RELEASE=1 CREATESMART=1 LINKSMART=1 FPCDIR=%fpc_dir %fpc_build %fpc_make clean all %fpc_install %fpc_make install INSTALL_BASEDIR=%buildroot%fpc_dir INSTALL_BINDIR=%buildroot%_bindir %fpc_make_win32 %fpc_make FPC=ppc386 OS_TARGET=win32 CPU_TARGET=i386 BINUTILSPREFIX=i386-mingw32msvc- %fpc_build_win32 %fpc_make_win32 %fpc_install_win32 %fpc_make_win32 install INSTALL_BASEDIR=%buildroot%fpc_dir INSTALL_BINDIR=%buildroot%_bindir %fpc_files()\ %%dir %fpc_dir\ %%dir %fpc_dir/units\ %%dir %fpc_dir/units/%1\ %%dir %fpc_dir/units/%1/%2\ %fpc_dir/units/%1/%2/%{?3:%3}%{!?3:*.*} %fpc_win32_make %fpc_make_win32 %fpc_win32_build %fpc_build_win32 %fpc_win32_install %fpc_install_win32 rpm-build-fpc-2.1/fpc.req000075500000000000000000000015201055331430100146700ustar00gitgit00000000000000#!/bin/sh -ef files=`cat` dump=$(echo "$files" |awk 'BEGIN{ORS="\0"}/[.]ppu$/' | PATH="${RPM_BUILD_ROOT:+$RPM_BUILD_ROOT/usr/bin:}${PATH:-/bin:/usr/bin}" \ xargs -r0 ppudump -vhim) reqprov=$(echo "$dump" |awk ' # preamble /^Analyzing .*[.]ppu [(]v[0-9]+[)]$/ { gsub("[^0-9]", "", $NF) ppuver = $NF } # header /^Target operating system/ { fpc = "fpc" if ($NF ~ /[Ww]in32/) fpc = "fpc-win32" } /^Interface [Cc]hecksum/ { provcrc = toupper($NF) } # interface /^Module [Nn]ame/ { prov = tolower($NF) printf "Provides: %s(%s) = %s-%s\n", fpc, prov, ppuver, provcrc } # interface and implementation /^Uses unit/ { req = tolower($3) sub("[)]$", "") reqcrc = toupper($NF) printf "Requires: %s(%s) = %s-%s\n", fpc, req, ppuver, reqcrc } ' |sort -u) echo "$files" |"$@" echo "$reqprov" |sed -n 's/Requires: //p' rpm-build-fpc-2.1/rpm-build-fpc.spec000064400000000000000000000033221055331430100167230ustar00gitgit00000000000000Name: rpm-build-fpc Version: 2.1 Release: alt2 Summary: RPM helpers for Free Pascal packages License: GPL Group: Development/Other Source: %name-%version.tar BuildArch: noarch %description RPM helpers for Free Pascal packages: - fpc.req -- find-requires wrapper; - fpc.prov -- find-provides wrapper; - fpc.macros -- RPM macros. %prep %setup -q %build sed -e '$s/Requires:/Provides:/' fpc.req >fpc.prov diff -u fpc.req fpc.prov && exit 1 touch -r fpc.req fpc.prov %install install -pD -m755 fpc.req %buildroot%_rpmlibdir/fpc.req install -pD -m755 fpc.prov %buildroot%_rpmlibdir/fpc.prov install -pD -m644 fpc.macros %buildroot/etc/rpm/macros.d/fpc %files %doc README.ALT %_rpmlibdir/fpc.req %_rpmlibdir/fpc.prov %config /etc/rpm/macros.d/fpc %changelog * Wed Jan 17 2007 Alexey Tourbin 2.1-alt2 - changed dependency versioning to $ppu_file_format-$interface_checksum * Tue Jan 16 2007 Alexey Tourbin 2.1-alt1 - reworked and unifeid fpc.{req,prov} scripts - added %%fpc_win32_* aliases for %%fpc_*_win32 macros - added README.ALT * Sat Sep 16 2006 Alexey Tourbin 2.0-alt2 - imported sources into git repo - removed Requires to make fpc bootstrap more transparent - changed win32 dependency format: fpc-win32(ppu) instead of fpc(ppu)(win32) - removed internal ppu versioning since it is subject to interface CRC * Sun Sep 10 2006 Alexey Tourbin 2.0-alt1 - initial revision, based on previous helerps from fpc package - fpc.macros: new RPM macros + %%fpc_dir + %%fpc_build %%fpc_install + %%fpc_build_win32 %%fpc_install_win32 - fpc.req, fpc.prov: + adjust dependencies for win32 cross-compiled units + adjust unit versioning according to internal ppu version