[sword-devel] intro & rpm spec file

Brook Humphrey sword-devel@crosswire.org
Thu, 8 Apr 2004 08:35:40 -0700


--Boundary-00=_MFXdA9aPCPa9YGh
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Tuesday 06 April 2004 03:22 pm, Troy A. Griffitts wrote:
> Brook,
> 	Where are your spec files?
>
Hm it seems I tried to send them to the list but they were sent to the 
original poster instead. Here you go.

--Boundary-00=_MFXdA9aPCPa9YGh
Content-Type: text/plain;
  charset="iso-8859-1";
  name="sword.spec"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="sword.spec"

%{expand:%%define buildfor %(A=3D$(awk '{print $4}' /etc/redhat-release); i=
f [ "$A" !=3D "" ]; then echo "$A"; fi)}
%{expand:%%define buildfor9_1 %(A=3D$(awk '{print $4}' /etc/redhat-release)=
; if [ "$A" =3D 9.1 ]; then echo 1; else echo 0; fi)}
%{expand:%%define buildfor9_2 %(A=3D$(awk '{print $4}' /etc/redhat-release)=
; if [ "$A" =3D 9.2 ]; then echo 1; else echo 0; fi)}
%{expand:%%define buildfor10_0 %(A=3D$(awk '{print $4}' /etc/redhat-release=
); if [ "$A" =3D 10 ]; then echo 1; else echo 0; fi)}


%if %buildfor10_0
%define 		unstable 	1
%else
%define 		unstable 	0
%endif
#add mandrake version
%define		for_crosswire	1


%define 		name 		sword
%define 		version 	1.5.7
%define		rel	2mdk
%define		lib_name_orig 	libsword
%define		lib_major 	3
#define		lib_name 	%mklibname %name %lib_major
%define		lib_name	lib%{name}%{lib_major}

%if %for_crosswire
# this needs to be changed depending on build number=20
# and weather or not it is static
%define		release 	%rel
%else
%define 		release	%rel
%endif

Summary:	The SWORD Project framework for manipulating Bible texts
Summary(cs): 	Programy pro studium Bible a v=FDvojov=E9 n=E1stroje.
Summary(sk): 	Programy pre =B9t=FAdium Biblie a v=FDvojov=E9 n=E1stroje.
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL
URL:		http://www.crosswire.org
Source0: 	http://www.crosswire.org/download/ftpmirror.tmp/pub/sword/source/=
v1.5/%{name}-%{version}.tar.bz2
Source1: 	ftp://ftp.zedz.net/pub/crypto/crypto/LIBS/sapphire/sapphire.zip=20
Source2:	sword_icons.tar.bz2
Patch0:		sword-patch-curl.diff
Group: 		System/Libraries
BuildRequires:	zlib-devel
BuildRequires:	curl-devel >=3D 7.10.5
BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
Provides: 	sword =3D %{version}
Prefix: 	%{_prefix}
Requires:	%{lib_name} =3D %{version}
Requires:	curl >=3D 7.10.5
Requires:	zlib


%description
The SWORD Project is an effort to create an ever expanding software package=
=20
for research and study of God and His Word.  The SWORD Framework=20
allows easy manipulation of Bible texts, commentaries, lexicons, dictionari=
es,=20
etc.  Many frontends are build using this framework.  An installed module=20
set may be shared between any frontend using the framework.

%description -l cs
Snahou projektu SWORD je vytvo=F8it voln=E9 (ve smyslu licence OpenSource)
programy, v=FDvojov=E9 n=E1stroje a pom=F9cky ke studiu Bible.
Mohou b=FDt instalov=E1ny dal=B9=ED, voliteln=EC p=F8=EDdavn=E9 moduly: r=
=F9zn=E9 p=F8eklady Bible,
koment=E1=F8e, v=FDklady a slovn=EDky.

%description -l sk
Cie=B5om projektu SWORD je vytvori=BB vo=B5n=E9 (vo zmysle licencie OpenSou=
rce)
programy, v=FDvojov=ED n=E1stroje a pom=F4cky pre =B9t=FAdium Biblie.. M=F4=
=BEu sa tie=BE
nain=B9talova=BB =EFal=B9ie volite=B5n=E9 a pr=EDdavn=E9 moduly: r=F4zne pr=
eklady Biblie,
Biblick=E9 koment=E1re, lexik=F3ny a slovn=EDky.


#main package (contains *.so.[major].* only)
%package -n %{lib_name}
Summary: 	Main library for sword #(!) summary for main lib RPM only
Group: 		System/Libraries

%description -n %{lib_name}
This package contains the library needed to run programs dynamically
linked with sword.

%package 	-n %{lib_name}-devel
Summary: 	Include files for developing sword applications.
Group: 		System/Libraries
Requires: 	%{lib_name} =3D %{version}
Requires:	curl-devel >=3D 7.10.5
Requires:	zlib-devel
Provides: 	%{lib_name_orig}-devel =3D %{version}-%{release} %{name}-devel =
=3D %{version}-%{release}=20

%description -n %{lib_name}-devel
This package contains the headers that programmers=20
will need to develop applications which will use the SWORD Bible Framework.

%package -n %{lib_name}-static-devel
Summary: 	Static libs for developing sword applications.
Group: 		System/Libraries
Requires: 	%{lib_name} =3D %{version} %{lib_name}-devel =3D %{version}
Provides: 	%{lib_name_orig}-static-devel =3D %{version}-%{release} %{name}-=
static-devel =3D %{version}-%{release}=20

%description -n %{lib_name}-static-devel
This package contains the static libraries that programmers=20
will need to develop applications which will use the SWORD Bible Framework.


%prep

%setup -q ${name}-%{version} -a2
%patch0 -p1
unzip -d sapphire %{SOURCE1}
cp sapphire/SAPPHIRE.H include/sapphire.h
cp sapphire/SAPPHIRE.CPP src/modules/common/sapphire.cpp

%build
export CFLAGS=3D"$RPM_OPT_FLAGS"
export CXXFLAGS=3D"$RPM_OPT_FLAGS"
export LDFLAGS=3D'-s'
CPPFLAGS=3D"$CFLAGS $CPPFLAGS -DUSBINARY"
export CPPFLAGS

=2E/usrinst.sh --disable-dependency-tracking --prefix=3D/usr --sysconfdir=
=3D/etc --enable-utilities --with-curl --disable-debug --enable-shared --wi=
th-conf

#make

%make=20

%install
rm -rf $RPM_BUILD_ROOT
make install-strip DESTDIR=3D"$RPM_BUILD_ROOT"
#make install_config DESTDIR=3D"$RPM_BUILD_ROOT"
#mkdir -p $RPM_BUILD_ROOT/usr/lib/sword
#exit 0
#%makeinstall

pushd utilities
install -m755 mkfastmod mod2vpl vpl2mod $RPM_BUILD_ROOT/%{_bindir}
popd

#no longer needed
#mv %{buildroot}/%{_bindir}/*-diatheke %{buildroot}/%{_bindir}/diatheke

%post -n %{lib_name} -p /sbin/ldconfig

%postun -n %{lib_name} -p /sbin/ldconfig

%post -n %{lib_name}-devel -p /sbin/ldconfig

%postun -n %{lib_name}-devel -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/sword.conf
%{_bindir}/*
%{_datadir}/%{name}
%doc README AUTHORS NEWS INSTALL LICENSE ChangeLog=20
%doc samples doc/*.*

%files -n %{lib_name}
%defattr(-,root,root)
%{_libdir}/*.so.*

%files -n %{lib_name}-devel
%defattr(-,root,root)
%attr(0755,root,root) %dir %{_includedir}/sword
%{_includedir}/sword/*.*
%{_libdir}/*.so
%{_libdir}/*.la
%{_libdir}/pkgconfig/*.pc
#removed from main. May add it back later.
#%doc doc/api-documentation

%files -n %{lib_name}-static-devel
%defattr(-,root,root)
%{_libdir}/*.a

%changelog
* Fri Jan 23 2004 Brook Humphrey <bah@linux-mandrake.com> 1.5.7-2mdk
=2D Trying to fix buildrequires to be more cross os compatable.=20

* Mon Dec 28 2003 Brook Humphrey <bah@linux-mandrake.com> 1.5.7-1mdk
=2D hopefully fixed build problems due to optimizations and mandrake 9.2=20

* Thu Nov 13 2003 Brook Humphrey <bah@linux-mandrake.com> 1.5.6-1mdk
=2D New build for sword 1.5.6
=2D diatheke installs cleanly so it is not needed to force a name change no=
w.
=2D api docs removed from devel package because they are no longer distribu=
ted with the main package.
=2D may add api docs back later.
=2D fixed recursive requires for sword and libsword.
=2D fixed build to use optflags.
=2D fixed permission problems with include directory.=20

* Fri Apr 25 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.5.5-5mdk
=2D Buildrequire zlib-devel (thx slbd)

* Thu Apr 24 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.5.5-4mdk
=2D Don't provide name in libname package
=2D Bump release a bit more

* Thu Mar 13 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.5.5-2mdk
=2D cleanups
=2D ->contrib

* Fri Dec 13 2002 Brook Humphrey <bah@webmedic.net> sword-1.5.5-1mdk9.0_kde=
3.1
=2D Compiled for mandrake 9.0 using texstars 3.1rc5 rpm's they also have aa=
fonts enabled.

* Wed Oct 9 2002 Brook Humphrey <bah@webmedic.net> sword-1.5.4-1mdk9.0
=2D Compiled for mandrake 9.0.=20
=2D This is current cvs as it wouldn't compile with gcc 3.2 before this.
=2D Fixed files as some of the files changed from 1.5.3.=20
=2D Most notably man is gone now for the api.

* Tue Feb 19 2002 Brook Humphrey <bah@webmedic.net> sword-1.5.3.pre-1mdk
=2D Compiled on mandrake 8.2=20
=2D first rpm of sword 1.5.3 pre
=2D removed chetah from build as it doesn't build proper
=2D added configure to sword build for proper build

* Sun Jan 27 2002 Brook Humphrey <bah@webmedic.net> sword-1.5.2-6mdk
=2D Added libsword1-static-devel package

* Tue Jul 10 2001 Brook Humphrey <bah@webmedic.net> sword-1.5.2-5mdk
=2D Updates to newest sources with bug fixes

* Fri Jun 22 2001 Brook Humphrey <bah@webmedic.net> sword-base-1.5.2-1mdk
=2D Added lib packages to be compliant with mandrake specs

* Mon Apr 30 2001 Brook Humphrey <bah@webmedic.net>
=2D added more mandrake macros for build
=2D removed apps for build cvs.20010430. They would not build

* Sun Apr 22 2001 Brook Humphrey <bah@webmedic.net>
=2D added man pages for api to package
=2D added html api doc to package

* Wed Mar 14 2001 Brook Humphrey <bah@webmedic.net>
=2D updated to use mandrake menu sysem

* Mon Feb 19 2001 Brook Humphrey <bah@webmedic.net>
=2D merged spec files from myself and Petr Kri'tof with this one
=2D added Petr Kri'tof's and my own comments to this changelog

* Sat Jan 20 2001 Stuart Gathman <stuart@bmsi.com>
=2D mkfastmod and other utilities

* Thu Nov 30 2000 Stuart Gathman <stuart@bmsi.com>
=2D cheatah application

* Mon Nov 20 2000 Brook Humphrey <bah@webmedic.net>
=2D added crypto to sword package
=2D updated to sword 1.5.1a

* Fri Nov 17 2000 Stuart Gathman <stuart@bmsi.com>
=2D initial release

* Fri Mar 17 2000 Petr Kri=B9tof <Petr@Kristof.CZ>
=2D Sword 1.5.0 tree adaption

* Wed Mar 1 2000 Petr Kri=B9tof <Petr@Kristof.CZ>
=2D Slovak descriptions added (Viera Valkova <ValkovaV@logica.com>)

* Tue Jan 4 2000 Brook Humphrey <bah@webmedic.net>
=2D Changed icon to sword.xpm

* Sun Jun 20 1999 Petr Kri=B9tof <Petr@Kristof.CZ>
=2D Compliant with mods.d

--Boundary-00=_MFXdA9aPCPa9YGh--