Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > c99e1cb0df223d76bba9646f520615d5 > files > 2

bibletime-1.5.1-1mdk.src.rpm

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

%if %buildfor10_0
%define 		unstable 	1
%else
%define 		unstable 	0
%endif


%define	name	bibletime
%define	version	1.5.1
%define	rel	%mkrel 1

# This should not be changed but set this to static or dynamic.
# Sword should always be set to dynamic unless doing a static build
%define			swordlibs	0
%define			kdelibs		0
%define			buildwizard	0
#add mandrake version
%define			for_crosswire	0

# We might have a prerelease:
%define have_pre %(echo %version|awk '{p=0} /[a-z,A-Z][a-z,A-Z]/ {p=1} {print p}')
%if %have_pre
%define real_ver %(perl -e '$name="%version"; print ($name =~ /(.*?)[a-z]/);')
%define release 0.%(echo %version|sed -e 's/%real_ver//g').%rel
%define old_ver %version
%else
%define real_ver %version
%define release %rel
%endif

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

# This the RPM group on your system that this will installed into.
# Graphical desktop/KDE, X11/apps, etc.
%define			rpmgroup 	Text tools

# this is were the sword modules will be installed on your system.
# /usr/local/sword, /usr/share/sword, /opt/local/sword, etc.
# default is /usr/share/sword
%define     	SwordPath 	/usr/share/sword
%define	    	ModsPath 	%{SwordPath}/mods.d

# Nothing else should need to be changed.
# Please do not edit below this line unless you know what you are doing.

Summary:        BibleTime is an easy to use Bible study tool for KDE
Name:			%{name}
Version:        %{real_ver}
Release:        %{release}
Icon:			bibletime.xpm
License:      GPL
Url:            http://www.bibletime.info
Group:          %{rpmgroup}
Source0:        http://prdownloads.sourceforge.net/bibletime/%{name}-%{version}.tar.bz2
BuildRequires:	kdelibs-devel
BuildRequires:	sword-devel >= 1.5.8
BuildRequires:  X11-devel
Requires:		sword >= 1.5.7
BuildRoot:      %{_tmppath}/%{name}-%{version}-root

%description
BibleTime is a free and easy to use bible study
 tool for UNIX systems.

BibleTime provides easy handling of digitized texts (Bibles, commentaries 
and lexicons) and powerful features to work with these texts (search in 
texts, write own notes, save, print etc.). Bibletime is a frontend for 
the  SWORD Bible Framework.

%prep
%setup -q -n %{name}-%{version}

export QTDIR=/usr/lib/qt3
export KDEDIR=%_prefix

export LD_LIBRARY_PATH="$QTDIR:/%_lib:$KDEDIR/%_lib:$LD_LIBRARY_PATH"
export PATH="$QTDIR/bin:$KDEDIR/bin:/usr/include/sword:$PATH"

# Search for qt/kde libraries in the right directories (avoid patch)
# NOTE: please don't regenerate configure scripts below
perl -pi -e "s@/lib(\"|\b[^/])@/%_lib\1@g if /(kde|qt)_(libdirs|libraries)=/" configure

%{?_cputoolize: %{_cputoolize} }

CFLAGS="%optflags" 
export CFLAGS
CXXFLAGS="%optflags"
export CXXFLAGS


./configure 	--prefix=%{_prefix} \
			--libdir=%{_libdir} \
			--disable-rpath \
%if %unstable
			--enable-debug=full \
%else
			--disable-debug \
%endif	
%if %kdelibs
			--enable-static-linking \
%endif
%if %swordlibs
			--enable-static-sword \
%endif    
			--without-kdewallet

%make 

%install
rm -rf $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT%{_prefix} install-strip
# For use with mandrake menu system
mkdir -p $RPM_BUILD_ROOT%{_menudir}
mkdir -p $RPM_BUILD_ROOT/usr/share/config

# generate directories for sword if building static
if [ %{swordlibs} = "static" ] ; then
 mkdir -p $RPM_BUILD_ROOT%{SwordPath}
 mkdir -p $RPM_BUILD_ROOT%{ModsPath}
 # Copy Sword language.conf files to our install dir
mkdir -p $RPM_BUILD_ROOT%{SwordPath}/locales.d
cp locales.d/*.conf $RPM_BUILD_ROOT%{SwordPath}/locales.d/

# Create Sword globals.conf for using bibletime without sword installed.
cat << EOF >$RPM_BUILD_ROOT%{ModsPath}/globals.conf
 [Globals]
EOF
fi

# For use with mandrake menu system 
cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name}
?package(bibletime):command="/usr/bin/%{name}" \
icon="%{name}.png" \
needs="X11" \
section="More applications/Editors" \
title="Bibletime" \
longtitle="An easy to use Bible study tool."
EOF

mkdir -p $RPM_BUILD_ROOT%{_liconsdir}
mkdir -p $RPM_BUILD_ROOT%{_iconsdir}
mkdir -p $RPM_BUILD_ROOT%{_miconsdir}
cd $RPM_BUILD_DIR/%{name}-%{version}
install -m 644 bibletime/pics/48x48/hi48-app-bibletime.png %{buildroot}/%{_liconsdir}/%{name}.png
install -m 644 bibletime/pics/32x32/hi32-app-bibletime.png %{buildroot}/%{_iconsdir}/%{name}.png
install -m 644 bibletime/pics/16x16/hi16-app-bibletime.png %{buildroot}/%{_miconsdir}/%{name}.png



%if %buildwizard
# For use with mandrake menu system 
cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name}-setup
?package(bibletime):command="/usr/bin/btsetupwizard" icon="bibletime.png" \
                needs="X11" section="Applications/Text tools/" title="Bibletime Setup Wizard" \
                longtitle="A setup tool for the easy to use Bible study tool."
EOF
%endif

# make README.RPM:

COMPILER="Compiler:               $(gcc -v 2>& 1|tail -1)"
HARDWARE="Hardware platform:      $(uname -m)"
LIBRARY="Library:                $(rpm -q glibc)"
OSVERSION="Linux Kernel:           $(uname -sr)"
PACKAGER="Packager:               %{packager}"
MDKRELEASE="Linux release:        $(cat /etc/redhat-release)"
RPMVERSION="RPM Version:            $(rpm -q rpm)"

cat <<EOF >>$RPM_BUILD_DIR/%{name}-%{version}/README.RPM
The pure-ftpd rpm packages were created in the following build environment:

$MDKRELEASE
$HARDWARE
$OSVERSION
$LIBRARY
$COMPILER
$RPMVERSION
$PACKAGER

EOF

%post
%if %swordlibs
# this is for creation of the sword.conf for systems that are using bibletime without Sword installed.
if [ -f /etc/sword.conf ] ; then
         echo "sword.conf already exists skiping sword.conf creation." ;
else
cat << EOF >/etc/sword.conf
[Install]
DataPath=%{SwordPath}
EOF
fi
%endif

/sbin/ldconfig

# For use with mandrake menu system
%{update_menus}

%postun
# For use with mandrake menu system
%{clean_menus}

/sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)

%if %swordlibs
#Sword config files
%config %{ModsPath}/globals.conf
%config %{SwordPath}/locales.d/*.conf
%endif

%if %buildwizard
# Bibletime wizard
%{_bindir}/btsetupwizard
%endif


# global BibleTime config files
%{_bindir}/bibletime
%{_datadir}/applnk/Applications/*
%{_datadir}/apps/bibletime/
%{_datadir}/icons/*/*/*/*.png

#docs
%doc %{_prefix}/share/doc/HTML/*
%doc ChangeLog INSTALL 
%doc README.RPM

# For use with mandrake menu system
%{_menudir}/%{name}
%{_iconsdir}/%{name}.png
%{_miconsdir}/%{name}.png
%{_liconsdir}/%{name}.png

%exclude %{_includedir}

%changelog
* Tue Sep 13 2005 Buchan Milne <bgmilne@linux-mandrake.com> 1.5.1-1mdk
- New release 1.5.1

* Tue Sep 13 2005 Buchan Milne <bgmilne@linux-mandrake.com> 1.5.1-1mdk
- New release 1.5.1

* Thu Sep 08 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.4.1-4mdk
- Fix BuildRequires
- mkrel 

* Wed Aug 25 2004 Buchan Milne <bgmilne@linux-mandrake.com> 1.4.1-3mdk
- rebuild for sword4
- put menu in More applications/Editors for now
- make it short-circuit-able

* Fri Jul 16 2004 Buchan Milne <bgmilne@linux-mandrake.com> 1.4.1-2mdk
- rebuild for gcc-3.4, minor spec cleanups

* Thu Feb 24 2004 Brook Humphrey <bah@linux-mandrake.com> 1.4.1-1mdk
- updated for the latest bibletime

* Thu Nov 13 2003 Brook Humphrey <bah@linux-mandrake.com> 1.4-1mdk
- updated for the latest bibletime

* Thu Nov 13 2003 Brook Humphrey <bah@linux-mandrake.com> 1.3-1mdk
- masive overhaul and cleaqnup
- merged buchans changes 
- updates spec to compile like other mandrkae kde packages.
- updated to bibletime 1.3

* Sun Apr 27 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.2.2-2mdk
- BuildRequires (thx slbd)
- Some file ownership fixes (distlint)

* Thu Mar 13 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.2.2-1mdk
- 1.2.2
- Cleanups

* Wed Jan 21 2003 Brook Humphrey <bah@webmedic.net> bibleitme-1.3.beta4-1mdk

- Massive clean up of spec file
- hopefully more readable and all arround usable. 

* Fri Dec 13 2002 Brook Humphrey <bah@webmedic.net> bibleitme-1.3.beta2-1mdk9.0

- Betabuild of bibletime for testing only 

* Tue Oct 9 2002 Brook Humphrey <bah@webmedic.net> bibleitme-1.2.2-cvs-1mdk9.0

- Build for mandrake 9.0/ Fixes for gcc 3.2 should allow it to build this time.

- Changed files somewhat as the build droped some and added some.

- Added mandrake menu for bibletime setup wizard.

- Changed the icons to the new hicolor png's for the mandrake menues.

* Fri Aug 2 2002 Brook Humphrey <bah@webmedic.net> bibleitme-1.2.1

- Build for Mandrake 9.0

* Mon Apr 8 2002 Brook Humphrey <bah@webmedic.net> bibletime-1.1

- Added to the spec to better handle mandrake menus during compile. Now should be compatable with all os's.

- added locals.d source to build. This removes dependecy on sword being installed. Will make seperate package for this later.


* Fri Mar 31 2002 Joachim Ansorg <jansorg@gmx.de>

- Made including the book translations working finally.

- Fixed SPEC files to work with SuSE


* Thu Feb 7 2002 Brook Humphrey <bah@webmedic.net> bibletime-1.0.2

- changed compile time options to mach bibletime spec included with source files

- compiled on mandrake 8.2


* Fri Sep 7 2001 Joachim Ansorg <jansorg@gmx.de>

- Added the bookname files in the file list

* Tue Jul 10 2001 Brook Humphrey <bah@webmedic.net> bibletime-1.0.1-Mandrake8.0.4mdk

- Recompile because of dependecy problems.  

* Tue Jul 10 2001 Brook Humphrey <bah@webmedic.net> bibletime-1.0.1-Mandrake8.0.1mdk

- bug fix release bibletime-1.0.1

- adda extra compile options to spec file.

- Merged in suse changes for compileing on SuSE

* Sun May 27 2001 Brook Humphrey <bah@webmedic.net>

- Trying different variations of static compiles again.

- Still using cvs sources while waiting for 1.0 release.

* Thu May 24 2001 Brook Humphrey <bah@webmedic.net>

- Trying for x static and whatever else we can get into it.

- No X for today Got libz to compile in but it causes segfault.

* Wed May 23 2001 Brook Humphrey <bah@webmedic.net>

- Yet another try at static qt.

- Qt static works now.

* Mon May 21 2001 Brook Humphrey <bah@webmedic.net>

- Static is working for kde and a few other libs but not qt yet.

- Testing another patch today to try to get qt compiled static.

* Sun May 20 2001 Brook Humphrey <bah@webmedic.net>

- Cleaned up spec some more(stupid spelling error's)

- static compile not working today so added option to compile kde and sword as static seperately

* Sat May 19 2001 Brook Humphrey <bah@webmedic.net>

- Cleaned up spec some more and added a few more comments

- Changed spec to automaticly do parts concerning static and Mandrake menus

- All info can be set in defines at top of spec file no other changes should need to be made

- Fixed patch to compile static should now compile static with kde libs 

- Test to compile with qt as static also

* Sun May 13 2001 Brook Humphrey <bah@webmedic.net>

- cleaned up spec file and added more comments for easier reading.

- changed sword.conf instelation to check for previous versions of sword.conf

- If found a new sword.conf is not created

- Made a patch to hopefully compile kde and other libs as atatic

- static compile didn't work for today.

* Tue May 8 2001 Brook Humphrey <bah@webmedic.net>

- Updated package to be relocatable

- added sword directories and sword.conf to install

* Mon Apr 30 2001 Brook Humphrey <bah@webmedic.net>

- Changed to build staticly

- added more mandrake macros to spec file

* Mon Apr 23 2001 Brook Humphrey <bah@webmedic.net>

- made changes to enable compile of cvs tree

* Wed Mar 14 2001 Brook Humphrey <bah@webmedic.net>

- updated to use mandrake menu sysem