LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File plplot-5.9.4-1.0.spec of Package plplot (Project home:boriel:science)

Name:           plplot
# List of additional build dependencies
BuildRequires:  gcc-c++ cmake gcc-fortran python-devel
Version:        5.9.4
Release:        2
License:        GPL v2 or later
Source:         plplot-5.9.4.tar.bz2
Group:          Science/Library
Summary:        The plplot scientific plotting library
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
URL:            http://plplot.sourceforge.net
Packager:       Boriel <http://www.boriel.com>

This package provides runtime libraries for programs compiled with plplot.
Any program compiled against plplot depends on this package.

PLplot is a cross-platform software package for creating scientific
plots. To help accomplish that task it is organized as a core C
library, language bindings for that library, and device drivers which
control how the plots are presented in non-interactive and interactive
plotting contexts.

The PLplot core library can be used to create standard x-y plots,
semi-log plots, log-log plots, contour plots, 3D surface plots, mesh
plots, bar charts and pie charts. Multiple graphs (of the same or
different sizes) may be placed on a single page, and multiple pages
are allowed for those device formats that support them.

PLplot has core support for Unicode. This means plots can be labelled
using the enormous selection of Unicode mathematical symbols for
simple text layout (left to right) language scripts using our
libfreetype-based devices. For our SVG and libpango/libcairo-based
devices we additionally support complex text layout (CTL) languages
such as Arabic, Hebrew, and Indic and Indic-derived CTL scripts such
as Devanagari, Thai, Lao, and Tibetan.

%setup -q -n %name-%version


# Assume that the package is built by plain 'make' if there's no ./configure.
# This test is there only because the wizard doesn't know much about the
# package, feel free to clean it up
if test -x ./configure; then

# echo BUILDROOT: %buildroot

mkdir build_dir
cd build_dir

export CC="gcc -O2"
export CXX="g++ -O2"
export FC="gfortran -O2"

cmake -DCMAKE_INSTALL_PREFIX=/usr ../.

cd build_dir
make DESTDIR=%buildroot install
mv %buildroot/usr/lib %buildroot%{_libdir} 2>/dev/null || test 1
mv %buildroot/usr/share/doc/plplot %buildroot/usr/share/doc/%{name}%{version}

# Strip binaries (maybe this should go in the build stage)
for i in $(find %buildroot%{_bindir} -type f); do
	strip -s $i 2>/dev/null || test 1

for i in $(find %buildroot%{_libdir} -type f -name "*.so*"); do
	strip -s $i 2>/dev/null || test 1

# Remove include files (they go in the -devel package) and .so libs 
rm -rf %buildroot/usr/include
for i in $(find %buildroot%{_libdir} -name "lib*.so"); do rm $i; done

# Remove sample files
rm -rf %buildroot/usr/share/%{name}%{version}/examples

# Move fortran/modules to gfortran/modules
mkdir -p %{buildroot}%{_libdir}/gfortran/modules/
mv %{buildroot}%{_libdir}/fortran/modules/plplot %{buildroot}%{_libdir}/gfortran/modules/%{name}%{version}

# Write a proper %%files section and remove these two commands and
# the '-f filelist' option to %%files
# echo '%%defattr(-,root,root)' >%buildroot/filelist
# find %buildroot/install -type f -printf '/usr/%%P*\n' >>%buildroot/filelist



rm -rf %buildroot


# This is a place for a proper filelist:
# /usr/bin/plplot
# You can also use shell wildcards:
# /usr/share/plplot/*
# This installs documentation files from the top build directory
# into /usr/share/doc/...
# The advantage of using a real filelist instead of the '-f filelist' trick is
# that rpmbuild will detect if the install section forgets to install
# something that is listed here

%doc /usr/share/doc/%{name}%{version}/*
%dir /usr/share/doc/%{name}%{version}

%dir %{_libdir}/gfortran
%dir %{_libdir}/gfortran/modules
%dir %{_libdir}/gfortran/modules/%{name}%{version}





* Sat Jun 27 2009 boriel@gmail.com
- packaged libplplot version 5.9.4 using the buildservice spec file wizard