%define name p2c %define version 1.22 %define release 11mdk Summary: A Pascal to C translator. Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Development/Other Source: ftp://csvax.cs.caltech.edu/pub/p2c-1.22.tar.bz2 URL: http://www.synaptics.com/people/daveg/ Patch2: p2c-newpatch.patch.bz2 BuildRoot: %{_tmppath}/%{name}-root Obsoletes: basic Provides: basic %description P2c is a system for translating Pascal programs into the C language. P2c accepts input source files in certain Pascal dialects: HP Pascal, Turbo/UCSD Pascal, DEC VAX Pascal, Oregon Software Pascal/2, Macintosh Programmer's Workshop Pascal and Sun/Berkeley Pascal. P2c outputs a set of .c and .h files which make up a C program equivalent to the original Pascal program. The C program can then be compiled using a standard C compiler, such as gcc. Install the p2c package if you need a program for translating Pascal code into C code. %package devel Summary: Files for p2c Pascal to C translator development. Group: Development/Other %description devel The p2c-devel package contains the files necessary for development of the p2c Pascal to C translation system. Install the p2c-devel package if you want to do p2c development. %prep %setup -q %patch2 -p1 -b .new mkdir src/shlib mkdir include ln -s ../src include/p2c %build cp src/sys.p2crc src/p2crc make RPM_OPTS="$RPM_OPT_FLAGS" make RPM_OPTS="$RPM_OPT_FLAGS" shlib -C src %install rm -rf %{buildroot} mkdir -p %{buildroot}{%{_mandir}/man1,%{_libdir},%{_includedir}} make install RPM_INSTALL=%{buildroot} LIBDIR=$RPM_BUILD_ROOT%{_libdir} MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 strip %{buildroot}%{_bindir}/p2c find %{buildroot}/ -type 'f'|grep -E '.*[0-9]($|x)' | xargs file \ | grep troff | cut -d: -f1 | xargs bzip2 -9 for i in `find %{buildroot}/ -type 'f' -perm '+a=x' ! -name 'lib*so*'`; do file $i |grep -q "not stripped" && strip $i done %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf %{buildroot} %files %defattr(-,root,root) #%doc %_docdir/p2c-1.22 %{_bindir}/* %{_libdir}/libp2c.so* %{_libdir}/p2c %{_mandir}/man1/p2c.1.bz2 %files devel %defattr(-,root,root) %{_libdir}/libp2c.a %{_includedir}/p2c %changelog * Wed Jul 23 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 1.22-11mdk - rebuild - macroize - fix install * Thu Jan 16 2003 Daouda LO <daouda@mandrakesoft.com> 1.22-10mdk - rebuild (glibc and/or unpackaged files) - new URL - GPL license * Sun Feb 3 2002 Daouda LO <daouda@mandrakesoft.com> 1.22-9mdk - rebuild ( cleanup - URL tag ... ) * Tue Mar 6 2001 Daouda Lo <daouda@mandrakesoft.com> 1.22-8mdk - spec clean up - rebuild -> add p2cc - replace buildroot dir * Tue Aug 29 2000 Etienne Faure <etienne@mandrakesoft.com> 1.22-7mdk - use _mandir macro * Mon Apr 3 2000 Adam Lebsack <adam@mandrakesoft.com> 1.22-6mdk - Release build. * Mon Nov 29 1999 Axalon Bloodstone <axalon@linux-mandrake.com> - move defattr to before doc * Wed May 05 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.com> - Mandrake adaptions * Mon Apr 12 1999 Preston Brown <pbrown@redhat.com> - fixed group. * Sun Mar 21 1999 Michael Maher <mike@redhat.com> - Merged patched tar ball on gribble with original installation. Was missing important parts of make files. - Fixed many errors in Makefiles. - moved 'basic' stuff into doc * Fri Dec 18 1998 Cristian Gafton <gafton@redhat.com> - build for glibc 2.1 - buildroot - binary files and man page should really be in the main package, not -devel * Tue May 05 1998 Prospector System <bugs@redhat.com> - translations modified for de, fr, tr * Thu Jul 10 1997 Erik Troan <ewt@redhat.com> - built against glibc