1# Spec file for constructing installation package in RPM format.
2#
3# Quick instructions:
4#
5#   * run configure with the "--prefix" option set to the final
6#     installation directory (typically "/usr")
7#
8#   * copy the top_builddir/build/simage.spec file to the
9#     /usr/src/redhat/SPECS directory (on RedHat Linux, may differ
10#     on other system (on Mandrake, for instance, you should swap
11#     /usr/src/redhat/ with /usr/src/RPM))
12#
13#   * "cd /usr/src/redhat/SPECS", "rpm -bb simage.spec"
14#
15# There should now be a file simage-something.rpm below
16# /usr/src/redhat/RPMS.
17#
18#                                                    20000705 mortene.
19
20Summary: Tiny library for loading texture bitmaps.
21Name: simage
22Version: @VERSION@
23Release: @simage_configure_date@
24Copyright: Public Domain
25Group: Development/Libraries
26URL: http://www.coin3d.org
27Vendor: Systems in Motion
28Packager: Morten Eriksen <mortene@sim.no>
29
30%description
31
32simage is a library for loading texture bitmaps for 3D
33applications. It contains "wrappers" for libjpeg, libpng, libtiff and
34libungif, as well as native code for parsing bitmap files in SGI RGB,
35PIC and TARGA.  simage is used by the Coin 3D library.
36
37
38%prep
39
40cd $RPM_SOURCE_DIR
41export CVSROOT=:pserver:cvs@cvs.sim.no:/export/cvsroot
42if test ! -d simage; then
43  cvs checkout -P simage
44else
45  cvs update -dP simage
46fi
47
48
49%build
50
51cd $RPM_BUILD_DIR
52test -d simage || mkdir simage
53cd simage
54# Errors might go unnoticed if configuration info is taken from
55# an old cache.
56rm -f ./config.cache
57# The options must cover the set of install-directories in the %files section.
58$RPM_SOURCE_DIR/simage/configure \
59                       --bindir=@bindir@ --includedir=@includedir@ \
60                       --libdir=@libdir@ --datadir=@datadir@
61make
62
63
64%install
65
66cd $RPM_BUILD_DIR/simage
67make install-strip
68
69
70%files
71
72@bindir@/simage-config
73@includedir@/simage.h
74@libdir@/libsimage.so.@LT_CURRENT@
75@libdir@/libsimage.so.@LT_CURRENT@.@LT_AGE@.@LT_REVISION@
76@libdir@/libsimage.la
77@libdir@/libsimage.so
78@datadir@/aclocal/simage.m4
79
80
81%clean
82
83cd $RPM_BUILD_DIR/simage
84make uninstall
85