Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37776855
en ru br
ALT Linux repos
5.0: 3.14.1-alt1.M50.1

Group :: Development/Tools
RPM: pdtoolkit

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%ifarch %ix86
%define destdir linux
%endif
%ifarch x86_64
%define destdir x86_64
%endif
%define _perl_lib_path %buildroot%perl_vendor_privlib/pdbSql

Name: pdtoolkit
Version: 3.14.1
Release: alt1.M50.1
Summary: The Program Database Toolkit
License: BSD-like
Group: Development/Tools
Url: http://www.cs.uoregon.edu/research/pdt/
Packager: Eugeny A. Rostovtsev (REAL) <real at altlinux.org>

# originally extension of source archive was .tgz

Source: http://tau.uoregon.edu/pdt.tar.gz

BuildPreReq: gcc-fortran gcc-c++ rpm-build-perl

%description
The Program Database Toolkit (PDT) is a tool infrastructure that provides
access to the high-level interface of source code for analysis tools and
applications.  Currently, the toolkit consists of the C/C++ and Fortran 77/90/95
IL (Intermediate Language) Analyzers, and DUCTAPE (C++ program Database
Utilities and Conversion Tools APplication Environment) library and applica-
tions.  The EDG C++ (or Mutek Fortran 90) Front End first parses a source
file, and produces an intermediate language file.  The appropriate IL
Analyzer processes this IL file, and creates a "program database" (PDB) file
consisting of the high-level interface of the original source.  Use of the
DUCTAPE library then makes the contents of the PDB file accessible to
applications. This release also includes the Flint F95 parser from Cleanscape
Inc.

%package doc
Summary: Documentation for PDT
Group: Development/Documentation
BuildArch: noarch

%description doc
Documentation for PDT.

%package -n lib%name-devel
Summary: Static library and headers of PDT
Group: Development/Other

%description -n lib%name-devel
Static library and headers of PDT.

%package -n pdbsql
Summary: PDB files as a relational database
Group: Development/Databases
BuildArch: noarch
Requires: %name = %version-%release
Requires: sqlite3

%description -n pdbsql
The pdbsql package includes two important pieces:

- An SQLite schema that represents PDB files as a relational database.
- A Perl script for converting PDB 3.0 files to the SQLite form.

The goal of this package is to allow users to write code that consumes
data contained within PDB files in a wider set of languages than
currently provided by the C++ Ductape API alone.  Any language that
has a binding to SQLite can use this method of accessing PDB data.
Furthermore, the use of SQL to construct queries on the data removes
the need for the user to explicitly code up the query by combining STL
data structures, iterators, and query-specific logic.  This also means
that general purpose user interface tools for accessing the data in
the database can traverse the PDB data using the standard SQL language.

%prep
%setup

%build
TARGET=$PWD/built
./configure \
-useropt='%optflags' \
-GNU \
-prefix=$TARGET
%make_build

%install
TARGET=$PWD/built
%make install
pushd ductape/inc
PATH=$PATH:$TARGET/%destdir/bin ./MakeHtmlDocu
popd

rm contrib/pdbsql/sqlite-3.5.6.tar.gz -f
pushd $TARGET/%destdir/bin
sed -i -e '4,5d' f95parse gfparse
sed -i 's|${BINDIR}/gfortran|%_libexecdir/%name/bin|' gfparse
for i in $(ls *parse); do
sed -i '4s|^\(BINDIR\)\=.*|\1=%_bindir|' $i
sed -i '5s|^\(PDTDIR\)\=.*|\1=%prefix|' $i
done
popd

install -d %buildroot%_bindir
install -d %buildroot%_libdir
install -d %buildroot%_libexecdir/%name/bin
install -d %buildroot%_sysconfdir
install -d %buildroot%_includedir
install -d %buildroot%_docdir/%name
install -d %buildroot%_datadir/pdbsql
install -d %buildroot%perl_vendor_privlib/pdbSql
cp -fR $TARGET/include/* %buildroot%_includedir
cp -fR ductape/html/* %buildroot%_docdir/%name
install -m755 $TARGET/%destdir/bin/gfortran/* %buildroot%_libexecdir/%name/bin
rm -fR $TARGET/%destdir/bin/gfortran
install -m755 $TARGET/%destdir/bin/* %buildroot%_bindir
install -m644 $TARGET/%destdir/lib/* %buildroot%_libdir
install -m644 $TARGET/etc/* %buildroot%_sysconfdir
mv contrib/pdbsql/pdbSql.pm %buildroot%perl_vendor_privlib/pdbSql
install -p -m644 contrib/pdbsql/* %buildroot%_datadir/pdbsql

%files
%doc README CREDITS LICENSE doc
%_bindir/*
%_libexecdir/%name
%_sysconfdir/*

%files -n lib%name-devel
%_libdir/*.a
%_includedir/*

%files -n pdbsql
%_datadir/pdbsql
%perl_vendor_privlib/pdbSql

%files doc
%doc html
%_docdir/%name

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin