1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
|
# The original name of the software package is 'xforms' but the
# rpm packages go by the name 'libforms' in all distros. We need
# the original name in some situations.
%define origname @PACKAGE@
# Building a debug package doesn't seem to make too much sense
%define debug_package %{nil}
# Here we start...
Summary: XForms library
Name: libforms
Version: @VERSION@
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
License: LGPLv2+
Group: Development/Libraries
# To build the libraries we need the libXpm and libjpeg development
# packages (which in turn depend on the corresponding library packages)
BuildRequires: libXpm-devel
BuildRequires: libjpeg-devel
BuildRequires: mesa-libGL-devel
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{_prefix}
URL: http://xforms-toolkit.org/
%description
This is a GUI toolkit based on the X library for X Window Systems.
It features a rich set of objects, such as buttons, sliders, and
menus etc. integrated into an easy and efficient object/event
callback execution model that allows fast and easy construction
of X-applications. In addition, the library is extensible and new
objects can easily be created and added to the library.
# Beside the normal package create a "development" package, containing
# the header files for the three libraries, the static versions of the
# libraries and the fdesign and fd2ps programs.
%package devel
Summary: Header files and tools
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Header files, tools and static libraries for development with XForms.
# Also create a documentation package with the full documentation in
# info, HTML and PDF format. This is an architecture-independent
# package.
#
# Note: older rpmbuild versions get very unhappy when you try to build
# a 'noarch' sub-package together with architecture-dependent packages,
# spitting out weird error messages and refusing to build the package,
# so use 'noarch' only with newer versions of rpmbuild.
%package doc
Summary: XForms documentation
Group: Development/Libraries
Requires(post): info
Requires(preun): info
BuildRequires: texi2html
BuildRequires: texinfo
BuildRequires: texinfo-tex
BuildRequires: ImageMagick
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6 || 0%{?suse_version} >= 1230
BuildArch: noarch
%endif
%description doc
Info, HTML, PDF documentation and demo programs for XForms.
# Copy and unpack the tar-ball
%prep
%setup -q
# Build everything ('make' can be done in parallel)
%build
./configure --prefix=%{_prefix} \
--mandir=%{_mandir} \
--bindir=%{_bindir} \
--libdir=%{_libdir} \
--infodir=%{_infodir} \
--htmldir=%{_docdir}/%{name}/html \
--pdfdir=%{_docdir}/%{name} \
--enable-docs \
--disable-demos \
--disable-warnings \
--disable-debug \
--enable-optimization=-O2
make %{?_smp_mflags}
rm -rf demos/.deps
# Clear out the {buildroot} and install everything in {buildroot},
# then apply the following tweaks:
# 1) Delete the dir file from {_infodir}, it's not to be distributed
# and gets created (or updated) during installation on the target
# machine.
# 2) Strip the fdesign and fd2ps programs
# 3) Copy the directory with the demo programs to the documentation
# directory
# 4) Create a symbolic link from the xforms.5 man page to libforms.5
# (do that in a sub-process to avoid changing the working directory).
%install
rm -rf %{buildroot}
install -d -m 755 %{buildroot}
make DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_infodir}/dir
/usr/bin/strip %{buildroot}%{_libdir}/*.so.*.*.*
/usr/bin/strip %{buildroot}%{_bindir}/*
cp -r %{_builddir}/%{name}-%{version}/demos %{buildroot}%{_docdir}/%{name}
`cd %{buildroot}%{_mandir}/man5 && ln -s %{origname}.5.gz %{name}.5.gz`
%clean
rm -rf %{buildroot}
# Set up list of files in the binary package: just the libraries and the
# man page for the libforms library.
%files
%{_libdir}/*.so.*
%{_mandir}/man5/*
%defattr(-,root,root)
%doc COPYING.LIB Copyright ChangeLog README
# Set up list of files going into the development package: header files,
# static libraries, utility programs and their man pages
%files devel
%{_bindir}/*
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/*.la
%{_mandir}/man1/*
%defattr(-,root,root)
# Set up list of files distributed with the documentation package:
# info, HTML, PDF documentation and demo programs
%files doc
%{_docdir}/%{name}/*
%{_infodir}/*
%defattr(-,root,root)
# Run ldconfig after install on the target machine to make the dynamic
# linker aware of the new libraries
%post
/sbin/ldconfig
# Run ldconfig after deinstall on the target machine of libraries
%postun
/sbin/ldconfig
# Update the info dir file and undo the compression that rpmbuild
# has applied to the image files below {_infodir} (these are image
# file for use by emacs' info mode and can't be read when gzip'ed).
%post doc
/sbin/install-info %{_infodir}/%{origname}.info %{_infodir}/dir || :
gunzip %{_infodir}/%{origname}_images/*.png.gz
# Before uninstalling remove the entry for the XForms info file from
# the dir file in {_infdir}. Also gzip the image files again because
# that's what they were during installation
%preun doc
if [ $1 = 0 ] ; then
/sbin/install-info --delete %{_infodir}/%{origname}.info %{_infodir}/dir || :
gzip %{_infodir}/%{origname}_images/*.png
fi
%changelog
* Sat Dec 21 2013 Jens Thoms Toerring <jt@toerring.de> 1.1.2.0-1
- spec file mostly rewritten for new 1.2.0 release, resulting
packages now have a name starting with 'libforms'
* Thu Jun 1 2010 Jens Thoms Toerring <jt@toerring.de> 1.0.93sp1
- New release 1.0.93sp1
* Wed Nov 4 2009 Jens Thoms Toerring <jt@toerring.de> 1.0.93sp1
- New release 1.0.91sp2
* Sat Nov 22 2008 Jens Thoms Toerring <jt@toerring.de> 1.0.91
- New release 1.0.91 - lots of bug fixes
* Wed Oct 6 2004 Angus Leeming <angus.leeming@btopenworld.com> 1.0.90
- Re-write the 'post' and 'postun' scripts to create the
symbolic links correctly without requiring the SO_VERSION hack.
* Fri May 7 2004 Angus Leeming <angus.leeming@btopenworld.com> 1.0.90
- add code to the 'post' script to modify libforms.la et al. to prevent
libtool from complaining that the files have been moved.
* Thu May 6 2004 Angus Leeming <angus.leeming@btopenworld.com> 1.0.90
- fix 'Release' and 'Source0' info.
- add 'post' and 'postun' scripts to create and remove symbolic links,
respectively.
* Thu May 6 2004 Angus Leeming <angus.leeming@btopenworld.com> 1.0.90
- no longer place devfiles and binfiles in ${RPM_BUILD_ROOT}.
Prevents rpm from bombing with a "Checking for unpackaged files" error.
* Sat Aug 31 2002 Duncan Haldane <duncan_haldane@users.sourceforge.net> 1.0-RC4
- mv fdesign, fd2ps to devel. restore xforms name of rpm.
* Sun Jul 14 2002 Greg Hosler <hosler@lugs.org.sg> 1.0-RC4
- Pass DESTDIR to makeinstall_std.
* Thu Jul 11 2002 Peter Galbraith <balbraith@dfo-mpo.gc.ca> 1.0-RC4
- Move from libxforms to libforms to match other distros.
* Tue Jul 8 2002 Chris Freeze <cfreeze@alumni.clemson.edu> 1.0-RC4
- First stab at spec file.
|