%define pkgname LibreOffice
%define major_version 5.1
%define version	%{major_version}.4
%ifarch %{ix86}
%define	uarch	x86
%define	pkgarch	x86
%define	rpmarch	i586
%endif
%ifarch x86_64
%define	uarch	x86_64
%define	pkgarch	x86-64
%define	rpmarch x86_64
%endif

#% define baseurl \{http://download.documentfoundation.org,http://mirrors.vinelinux.org\}/libreoffice/stable/%{version}/rpm/%{uarch}
%define baseurl http://mirrors.vinelinux.org/libreoffice/stable/%{version}/rpm/%{uarch}
%define dlurl \\\
	%{baseurl}/LibreOffice_%{version}_Linux_%{pkgarch}_rpm.tar.gz \\\
	%{baseurl}/LibreOffice_%{version}_Linux_%{pkgarch}_rpm_langpack_ja.tar.gz \\\
	%{baseurl}/LibreOffice_%{version}_Linux_%{pkgarch}_rpm_helppack_ja.tar.gz

Summary:	Package to assist installation of %{pkgname}
Summary(ja): 	%{pkgname} のインストールを補助するパッケージ
Name:		install-assist-%{pkgname}
Version:	%{version}
Release: 	1%{?_dist_release}
License:	LGPLv3
Group:		Applications/Productivity

ExclusiveArch:	%{ix86} x86_64
# Requires(posttrans) not yet implemented. So we use (post) instead.
Requires(post):	self-build-setup >= 1.0
Requires:	glibc >= 2.5
Requires:	gtk2 >= 2.10.4
Requires:	libgnome >= 2.16
#Requires:	libgail-gnome >= 1.8.6
Requires:	at-spi >= 1.7
Requires:	mesa-libGLU

# Needs JAVA VM <BTS:1168>
Requires:	java >= 1.6.0

# We have to specify previous version with "Conflicts:" 
# to make smart upgrading. See [VineSeed:20565]. 
# Conflicts:	openoffice.org-core <= 2.4.1-5vl5
Obsoletes:	openoffice.org < 3.0
Obsoletes:	openoffice.org-base < 3.0
Obsoletes:	openoffice.org-calc < 3.0
Obsoletes:	openoffice.org-core < 3.0
Obsoletes:	openoffice.org-devel < 3.0
Obsoletes:	openoffice.org-draw < 3.0
Obsoletes:	openoffice.org-emailmerge < 3.0
Obsoletes:	openoffice.org-graphicfilter < 3.0
Obsoletes:	openoffice.org-headless < 3.0
Obsoletes:	openoffice.org-i18n < 3.0
Obsoletes:	openoffice.org-impress < 3.0
Obsoletes:	openoffice.org-libs < 3.0
Obsoletes:	openoffice.org-math < 3.0
Obsoletes:	openoffice.org-pyuno < 3.0
Obsoletes:	openoffice.org-sdk < 3.0
Obsoletes:	openoffice.org-sdk-doc < 3.0
Obsoletes:	openoffice.org-testtools < 3.0
Obsoletes:	openoffice.org-writer < 3.0
Obsoletes:	openoffice.org-xsltfilter < 3.0
# Conflicts:	ooobasis3.1-core01 openoffice.org3.1-freedesktop-menus
# Conflicts:	ooobasis3.2-core01 openoffice.org3.2-freedesktop-menus 
# Conflicts:	openoffice.org-ure
Obsoletes:	openoffice.org3 < 3.3
Obsoletes:	openoffice.org3-ja < 3.3
Obsoletes:	ooobasis3.1-ja < 3.3, ooobasis3.2-ja < 3.3
Obsoletes:	ooobasis3.1-ja-base < 3.3, ooobasis3.2-ja-base < 3.3
Obsoletes:	ooobasis3.1-ja-calc < 3.3, ooobasis3.2-ja-calc < 3.3
Obsoletes:	ooobasis3.1-ja-draw < 3.3, ooobasis3.2-ja-draw < 3.3
Obsoletes:	ooobasis3.1-ja-help < 3.3, ooobasis3.2-ja-help < 3.3
Obsoletes:	ooobasis3.1-ja-impress < 3.3, ooobasis3.2-ja-impress < 3.3
Obsoletes:	ooobasis3.1-ja-math < 3.3, ooobasis3.2-ja-math < 3.3
Obsoletes:	ooobasis3.1-ja-res < 3.3, ooobasis3.2-ja-res < 3.3
Obsoletes:	ooobasis3.1-ja-writer < 3.3, ooobasis3.2-ja-writer < 3.3
Obsoletes:	ooobasis3.1-images < 3.3, ooobasis3.2-images < 3.3
Obsoletes:	ooobasis3.1-core01 < 3.3, ooobasis3.2-core01 < 3.3
Obsoletes:	ooobasis3.1-core02 < 3.3, ooobasis3.2-core02 < 3.3
Obsoletes:	ooobasis3.1-core03 < 3.3, ooobasis3.2-core03 < 3.3
Obsoletes:	ooobasis3.1-core04 < 3.3, ooobasis3.2-core04 < 3.3
Obsoletes:	ooobasis3.1-core05 < 3.3, ooobasis3.2-core05 < 3.3
Obsoletes:	ooobasis3.1-core06 < 3.3, ooobasis3.2-core06 < 3.3
Obsoletes:	ooobasis3.1-core07 < 3.3, ooobasis3.2-core07 < 3.3
Obsoletes:	ooobasis3.1-base < 3.3, ooobasis3.2-base < 3.3
Obsoletes:	ooobasis3.1-calc < 3.3, ooobasis3.2-calc < 3.3
Obsoletes:	ooobasis3.1-draw < 3.3, ooobasis3.2-draw < 3.3
Obsoletes:	ooobasis3.1-impress < 3.3, ooobasis3.2-impress < 3.3
Obsoletes:	ooobasis3.1-math < 3.3, ooobasis3.2-math < 3.3
Obsoletes:	ooobasis3.1-writer < 3.3, ooobasis3.2-writer < 3.3
Obsoletes:	openoffice.org3-base < 3.3
Obsoletes:	openoffice.org3-calc < 3.3
Obsoletes:	openoffice.org3-draw < 3.3
Obsoletes:	openoffice.org3-impress < 3.3
Obsoletes:	openoffice.org3-writer < 3.3
Obsoletes:	openoffice.org3-math < 3.3
Obsoletes:	ooobasis3.1-gnome-integration < 3.3, ooobasis3.2-gnome-integration < 3.3
Obsoletes:	ooobasis3.1-ja-binfilter < 3.3, ooobasis3.2-ja-binfilter < 3.3
Obsoletes:	ooobasis3.1-binfilter < 3.3, ooobasis3.2-binfilter < 3.3
Obsoletes:	ooobasis3.1-graphicfilter < 3.3, ooobasis3.2-graphicfilter < 3.3
Obsoletes:	ooobasis3.1-javafilter < 3.3, ooobasis3.2-javafilter < 3.3
Obsoletes:	ooobasis3.1-ooofonts < 3.3, ooobasis3.2-ooofonts < 3.3
Obsoletes:	ooobasis3.1-pyuno < 3.3, ooobasis3.2-pyuno < 3.3
Obsoletes:	ooobasis3.1-ooolinguistic < 3.3, ooobasis3.2-ooolinguistic < 3.3
Obsoletes:	openoffice.org-ure <= 1.6.1
Obsoletes:	openoffice.org3.1-freedesktop-menus < 3.3, openoffice.org3.2-freedesktop-menus < 3.3

Obsoletes:	install-assist-Go-oo < 3.3

Obsoletes:	libobasis3.3-core01 < 3.4
Obsoletes:	libreoffice3-ure <= 1.7.0
Obsoletes:	libreoffice3.3-freedesktop-menus < 3.4
# Obsoletes:	libobasis3.4-core01 < 3.5
# Obsoletes:	libreoffice3.4-ure < 3.5
# Obsoletes:	libreoffice3.4-freedesktop-menus < 3.5
Obsoletes:	libobasis3.4-base
Obsoletes:	libobasis3.4-binfilter
Obsoletes:	libobasis3.4-calc
Obsoletes:	libobasis3.4-core01
Obsoletes:	libobasis3.4-core02
Obsoletes:	libobasis3.4-core03
Obsoletes:	libobasis3.4-core04
Obsoletes:	libobasis3.4-core05
Obsoletes:	libobasis3.4-core06
Obsoletes:	libobasis3.4-core07
Obsoletes:	libobasis3.4-draw
Obsoletes:	libobasis3.4-en-US
Obsoletes:	libobasis3.4-en-US-base
Obsoletes:	libobasis3.4-en-US-binfilter
Obsoletes:	libobasis3.4-en-US-calc
Obsoletes:	libobasis3.4-en-US-math
Obsoletes:	libobasis3.4-en-US-res
Obsoletes:	libobasis3.4-en-US-writer
Obsoletes:	libobasis3.4-extension-beanshell-script-provider
Obsoletes:	libobasis3.4-extension-javascript-script-provider
Obsoletes:	libobasis3.4-extension-mediawiki-publisher
Obsoletes:	libobasis3.4-extension-nlpsolver
Obsoletes:	libobasis3.4-extension-pdf-import
Obsoletes:	libobasis3.4-extension-presentation-minimizer
Obsoletes:	libobasis3.4-extension-presenter-screen
Obsoletes:	libobasis3.4-extension-python-script-provider
Obsoletes:	libobasis3.4-extension-report-builder
Obsoletes:	libobasis3.4-gnome-integration
Obsoletes:	libobasis3.4-graphicfilter
Obsoletes:	libobasis3.4-images
Obsoletes:	libobasis3.4-impress
Obsoletes:	libobasis3.4-ja
Obsoletes:	libobasis3.4-ja-base
Obsoletes:	libobasis3.4-ja-binfilter
Obsoletes:	libobasis3.4-ja-calc
Obsoletes:	libobasis3.4-ja-help
Obsoletes:	libobasis3.4-ja-math
Obsoletes:	libobasis3.4-ja-res
Obsoletes:	libobasis3.4-ja-writer
Obsoletes:	libobasis3.4-javafilter
Obsoletes:	libobasis3.4-kde-integration
Obsoletes:	libobasis3.4-math
Obsoletes:	libobasis3.4-ogltrans
Obsoletes:	libobasis3.4-ooofonts
Obsoletes:	libobasis3.4-ooolinguistic
Obsoletes:	libobasis3.4-pyuno
Obsoletes:	libobasis3.4-testtool
Obsoletes:	libobasis3.4-writer
Obsoletes:	libobasis3.4-xsltfilter
Obsoletes:	libreoffice3.4
Obsoletes:	libreoffice3.4-base
Obsoletes:	libreoffice3.4-calc
Obsoletes:	libreoffice3.4-dict-en
Obsoletes:	libreoffice3.4-dict-es
Obsoletes:	libreoffice3.4-dict-fr
Obsoletes:	libreoffice3.4-draw
Obsoletes:	libreoffice3.4-en-US
Obsoletes:	libreoffice3.4-freedesktop-menus
Obsoletes:	libreoffice3.4-impress
Obsoletes:	libreoffice3.4-ja
Obsoletes:	libreoffice3.4-math
Obsoletes:	libreoffice3.4-ure
Obsoletes:	libreoffice3.4-writer

# Obsoletes:	libobasis3.5-core01
# Obsoletes:	libreoffice3.5-ure libreoffice3.5-stdlibs
# Obsoletes:	libreoffice3.5-freedesktop-menus
Obsoletes:	libobasis3.5-base
Obsoletes:	libobasis3.5-binfilter
Obsoletes:	libobasis3.5-calc
Obsoletes:	libobasis3.5-core01
Obsoletes:	libobasis3.5-core02
Obsoletes:	libobasis3.5-core03
Obsoletes:	libobasis3.5-core04
Obsoletes:	libobasis3.5-core05
Obsoletes:	libobasis3.5-core06
Obsoletes:	libobasis3.5-core07
Obsoletes:	libobasis3.5-draw
Obsoletes:	libobasis3.5-en-US
Obsoletes:	libobasis3.5-en-US-base
Obsoletes:	libobasis3.5-en-US-calc
Obsoletes:	libobasis3.5-en-US-math
Obsoletes:	libobasis3.5-en-US-res
Obsoletes:	libobasis3.5-en-US-writer
Obsoletes:	libobasis3.5-extension-beanshell-script-provider
Obsoletes:	libobasis3.5-extension-javascript-script-provider
Obsoletes:	libobasis3.5-extension-mediawiki-publisher
Obsoletes:	libobasis3.5-extension-nlpsolver
Obsoletes:	libobasis3.5-extension-pdf-import
Obsoletes:	libobasis3.5-extension-presentation-minimizer
Obsoletes:	libobasis3.5-extension-presenter-screen
Obsoletes:	libobasis3.5-extension-python-script-provider
Obsoletes:	libobasis3.5-extension-report-builder
Obsoletes:	libobasis3.5-gnome-integration
Obsoletes:	libobasis3.5-graphicfilter
Obsoletes:	libobasis3.5-images
Obsoletes:	libobasis3.5-impress
Obsoletes:	libobasis3.5-ja
Obsoletes:	libobasis3.5-ja-base
Obsoletes:	libobasis3.5-ja-calc
Obsoletes:	libobasis3.5-ja-help
Obsoletes:	libobasis3.5-ja-math
Obsoletes:	libobasis3.5-ja-res
Obsoletes:	libobasis3.5-ja-writer
Obsoletes:	libobasis3.5-javafilter
Obsoletes:	libobasis3.5-kde-integration
Obsoletes:	libobasis3.5-math
Obsoletes:	libobasis3.5-ogltrans
Obsoletes:	libobasis3.5-onlineupdate
Obsoletes:	libobasis3.5-ooofonts
Obsoletes:	libobasis3.5-ooolinguistic
Obsoletes:	libobasis3.5-postgresql-sdbc
Obsoletes:	libobasis3.5-pyuno
Obsoletes:	libobasis3.5-writer
Obsoletes:	libobasis3.5-xsltfilter
Obsoletes:	libreoffice3.5
Obsoletes:	libreoffice3.5-base
Obsoletes:	libreoffice3.5-calc
Obsoletes:	libreoffice3.5-dict-en
Obsoletes:	libreoffice3.5-dict-es
Obsoletes:	libreoffice3.5-dict-fr
Obsoletes:	libreoffice3.5-draw
Obsoletes:	libreoffice3.5-en-US
Obsoletes:	libreoffice3.5-freedesktop-menus
Obsoletes:	libreoffice3.5-impress
Obsoletes:	libreoffice3.5-ja
Obsoletes:	libreoffice3.5-math
Obsoletes:	libreoffice3.5-stdlibs
Obsoletes:	libreoffice3.5-ure
Obsoletes:	libreoffice3.5-writer

Obsoletes:	libobasis3.6-base
Obsoletes:	libobasis3.6-binfilter
Obsoletes:	libobasis3.6-calc
Obsoletes:	libobasis3.6-core01
Obsoletes:	libobasis3.6-core02
Obsoletes:	libobasis3.6-core03
Obsoletes:	libobasis3.6-core04
Obsoletes:	libobasis3.6-core05
Obsoletes:	libobasis3.6-core06
Obsoletes:	libobasis3.6-core07
Obsoletes:	libobasis3.6-draw
Obsoletes:	libobasis3.6-en-US
Obsoletes:	libobasis3.6-en-US-base
Obsoletes:	libobasis3.6-en-US-calc
Obsoletes:	libobasis3.6-en-US-math
Obsoletes:	libobasis3.6-en-US-res
Obsoletes:	libobasis3.6-en-US-writer
Obsoletes:	libobasis3.6-extension-beanshell-script-provider
Obsoletes:	libobasis3.6-extension-javascript-script-provider
Obsoletes:	libobasis3.6-extension-mediawiki-publisher
Obsoletes:	libobasis3.6-extension-nlpsolver
Obsoletes:	libobasis3.6-extension-pdf-import
Obsoletes:	libobasis3.6-extension-presentation-minimizer
Obsoletes:	libobasis3.6-extension-presenter-screen
Obsoletes:	libobasis3.6-extension-python-script-provider
Obsoletes:	libobasis3.6-extension-report-builder
Obsoletes:	libobasis3.6-gnome-integration
Obsoletes:	libobasis3.6-graphicfilter
Obsoletes:	libobasis3.6-images
Obsoletes:	libobasis3.6-impress
Obsoletes:	libobasis3.6-ja
Obsoletes:	libobasis3.6-ja-base
Obsoletes:	libobasis3.6-ja-calc
Obsoletes:	libobasis3.6-ja-help
Obsoletes:	libobasis3.6-ja-math
Obsoletes:	libobasis3.6-ja-res
Obsoletes:	libobasis3.6-ja-writer
Obsoletes:	libobasis3.6-javafilter
Obsoletes:	libobasis3.6-kde-integration
Obsoletes:	libobasis3.6-math
Obsoletes:	libobasis3.6-ogltrans
Obsoletes:	libobasis3.6-onlineupdate
Obsoletes:	libobasis3.6-ooofonts
Obsoletes:	libobasis3.6-ooolinguistic
Obsoletes:	libobasis3.6-postgresql-sdbc
Obsoletes:	libobasis3.6-pyuno
Obsoletes:	libobasis3.6-writer
Obsoletes:	libobasis3.6-xsltfilter
Obsoletes:	libreoffice3.6
Obsoletes:	libreoffice3.6-base
Obsoletes:	libreoffice3.6-calc
Obsoletes:	libreoffice3.6-dict-en
Obsoletes:	libreoffice3.6-dict-es
Obsoletes:	libreoffice3.6-dict-fr
Obsoletes:	libreoffice3.6-draw
Obsoletes:	libreoffice3.6-en-US
Obsoletes:	libreoffice3.6-freedesktop-menus
Obsoletes:	libreoffice3.6-impress
Obsoletes:	libreoffice3.6-ja
Obsoletes:	libreoffice3.6-math
Obsoletes:	libreoffice3.6-stdlibs
Obsoletes:	libreoffice3.6-ure
Obsoletes:	libreoffice3.6-writer

# $ rpm -qa --qf "Obsoletes: %{name}\n" | grep -e "libreoffice" -e "libobasis" | sort
Obsoletes: libobasis4.0-base
Obsoletes: libobasis4.0-calc
Obsoletes: libobasis4.0-core01
Obsoletes: libobasis4.0-core02
Obsoletes: libobasis4.0-core03
Obsoletes: libobasis4.0-core04
Obsoletes: libobasis4.0-core05
Obsoletes: libobasis4.0-core06
Obsoletes: libobasis4.0-core07
Obsoletes: libobasis4.0-draw
Obsoletes: libobasis4.0-en-US
Obsoletes: libobasis4.0-en-US-base
Obsoletes: libobasis4.0-en-US-calc
Obsoletes: libobasis4.0-en-US-math
Obsoletes: libobasis4.0-en-US-res
Obsoletes: libobasis4.0-en-US-writer
Obsoletes: libobasis4.0-extension-beanshell-script-provider
Obsoletes: libobasis4.0-extension-javascript-script-provider
Obsoletes: libobasis4.0-extension-mediawiki-publisher
Obsoletes: libobasis4.0-extension-nlpsolver
Obsoletes: libobasis4.0-extension-presentation-minimizer
Obsoletes: libobasis4.0-extension-python-script-provider
Obsoletes: libobasis4.0-extension-report-builder
Obsoletes: libobasis4.0-gnome-integration
Obsoletes: libobasis4.0-graphicfilter
Obsoletes: libobasis4.0-images
Obsoletes: libobasis4.0-impress
Obsoletes: libobasis4.0-ja
Obsoletes: libobasis4.0-ja-base
Obsoletes: libobasis4.0-ja-calc
Obsoletes: libobasis4.0-ja-help
Obsoletes: libobasis4.0-ja-math
Obsoletes: libobasis4.0-ja-res
Obsoletes: libobasis4.0-ja-writer
Obsoletes: libobasis4.0-javafilter
Obsoletes: libobasis4.0-kde-integration
Obsoletes: libobasis4.0-librelogo
Obsoletes: libobasis4.0-math
Obsoletes: libobasis4.0-ogltrans
Obsoletes: libobasis4.0-onlineupdate
Obsoletes: libobasis4.0-ooofonts
Obsoletes: libobasis4.0-ooolinguistic
Obsoletes: libobasis4.0-postgresql-sdbc
Obsoletes: libobasis4.0-pyuno
Obsoletes: libobasis4.0-writer
Obsoletes: libobasis4.0-xsltfilter
Obsoletes: libreoffice4.0
Obsoletes: libreoffice4.0-base
Obsoletes: libreoffice4.0-calc
Obsoletes: libreoffice4.0-dict-en
Obsoletes: libreoffice4.0-dict-es
Obsoletes: libreoffice4.0-dict-fr
Obsoletes: libreoffice4.0-draw
Obsoletes: libreoffice4.0-en-US
Obsoletes: libreoffice4.0-freedesktop-menus
Obsoletes: libreoffice4.0-impress
Obsoletes: libreoffice4.0-ja
Obsoletes: libreoffice4.0-math
Obsoletes: libreoffice4.0-ure
Obsoletes: libreoffice4.0-writer

Obsoletes: libobasis4.1-base
Obsoletes: libobasis4.1-calc
Obsoletes: libobasis4.1-core01
Obsoletes: libobasis4.1-core02
Obsoletes: libobasis4.1-core03
Obsoletes: libobasis4.1-core04
Obsoletes: libobasis4.1-core05
Obsoletes: libobasis4.1-core06
Obsoletes: libobasis4.1-core07
Obsoletes: libobasis4.1-draw
Obsoletes: libobasis4.1-en-US
Obsoletes: libobasis4.1-en-US-base
Obsoletes: libobasis4.1-en-US-calc
Obsoletes: libobasis4.1-en-US-math
Obsoletes: libobasis4.1-en-US-res
Obsoletes: libobasis4.1-en-US-writer
Obsoletes: libobasis4.1-extension-beanshell-script-provider
Obsoletes: libobasis4.1-extension-javascript-script-provider
Obsoletes: libobasis4.1-extension-mediawiki-publisher
Obsoletes: libobasis4.1-extension-nlpsolver
Obsoletes: libobasis4.1-extension-pdf-import
Obsoletes: libobasis4.1-extension-presentation-minimizer
Obsoletes: libobasis4.1-extension-report-builder
Obsoletes: libobasis4.1-gnome-integration
Obsoletes: libobasis4.1-graphicfilter
Obsoletes: libobasis4.1-images
Obsoletes: libobasis4.1-impress
Obsoletes: libobasis4.1-ja
Obsoletes: libobasis4.1-ja-base
Obsoletes: libobasis4.1-ja-calc
Obsoletes: libobasis4.1-ja-help
Obsoletes: libobasis4.1-ja-math
Obsoletes: libobasis4.1-ja-res
Obsoletes: libobasis4.1-ja-writer
Obsoletes: libobasis4.1-kde-integration
Obsoletes: libobasis4.1-librelogo
Obsoletes: libobasis4.1-math
Obsoletes: libobasis4.1-ogltrans
Obsoletes: libobasis4.1-onlineupdate
Obsoletes: libobasis4.1-ooofonts
Obsoletes: libobasis4.1-ooolinguistic
Obsoletes: libobasis4.1-postgresql-sdbc
Obsoletes: libobasis4.1-python-script-provider
Obsoletes: libobasis4.1-pyuno
Obsoletes: libobasis4.1-writer
Obsoletes: libobasis4.1-xsltfilter
Obsoletes: libreoffice4.1
Obsoletes: libreoffice4.1-base
Obsoletes: libreoffice4.1-calc
Obsoletes: libreoffice4.1-dict-en
Obsoletes: libreoffice4.1-dict-es
Obsoletes: libreoffice4.1-dict-fr
Obsoletes: libreoffice4.1-draw
Obsoletes: libreoffice4.1-en-US
Obsoletes: libreoffice4.1-freedesktop-menus
Obsoletes: libreoffice4.1-impress
Obsoletes: libreoffice4.1-ja
Obsoletes: libreoffice4.1-math
Obsoletes: libreoffice4.1-ure
Obsoletes: libreoffice4.1-writer

# $ rpm -qa --qf "Obsoletes: %{name}\n" | grep -e "libreoffice" -e "libobasis" | sort
Obsoletes: libobasis4.2-base
Obsoletes: libobasis4.2-calc
Obsoletes: libobasis4.2-core01
Obsoletes: libobasis4.2-core02
Obsoletes: libobasis4.2-core03
Obsoletes: libobasis4.2-core04
Obsoletes: libobasis4.2-core05
Obsoletes: libobasis4.2-core06
Obsoletes: libobasis4.2-core07
Obsoletes: libobasis4.2-draw
Obsoletes: libobasis4.2-en-US
Obsoletes: libobasis4.2-en-US-base
Obsoletes: libobasis4.2-en-US-calc
Obsoletes: libobasis4.2-en-US-math
Obsoletes: libobasis4.2-en-US-res
Obsoletes: libobasis4.2-en-US-writer
Obsoletes: libobasis4.2-extension-beanshell-script-provider
Obsoletes: libobasis4.2-extension-javascript-script-provider
Obsoletes: libobasis4.2-extension-mediawiki-publisher
Obsoletes: libobasis4.2-extension-nlpsolver
Obsoletes: libobasis4.2-extension-pdf-import
Obsoletes: libobasis4.2-extension-report-builder
Obsoletes: libobasis4.2-gnome-integration
Obsoletes: libobasis4.2-graphicfilter
Obsoletes: libobasis4.2-images
Obsoletes: libobasis4.2-impress
Obsoletes: libobasis4.2-ja
Obsoletes: libobasis4.2-ja-base
Obsoletes: libobasis4.2-ja-calc
Obsoletes: libobasis4.2-ja-help
Obsoletes: libobasis4.2-ja-math
Obsoletes: libobasis4.2-ja-res
Obsoletes: libobasis4.2-ja-writer
Obsoletes: libobasis4.2-kde-integration
Obsoletes: libobasis4.2-librelogo
Obsoletes: libobasis4.2-math
Obsoletes: libobasis4.2-ogltrans
Obsoletes: libobasis4.2-onlineupdate
Obsoletes: libobasis4.2-ooofonts
Obsoletes: libobasis4.2-ooolinguistic
Obsoletes: libobasis4.2-postgresql-sdbc
Obsoletes: libobasis4.2-python-script-provider
Obsoletes: libobasis4.2-pyuno
Obsoletes: libobasis4.2-writer
Obsoletes: libobasis4.2-xsltfilter
Obsoletes: libreoffice4.2
Obsoletes: libreoffice4.2-base
Obsoletes: libreoffice4.2-calc
Obsoletes: libreoffice4.2-dict-en
Obsoletes: libreoffice4.2-dict-es
Obsoletes: libreoffice4.2-dict-fr
Obsoletes: libreoffice4.2-draw
Obsoletes: libreoffice4.2-en-US
Obsoletes: libreoffice4.2-freedesktop-menus
Obsoletes: libreoffice4.2-impress
Obsoletes: libreoffice4.2-ja
Obsoletes: libreoffice4.2-math
Obsoletes: libreoffice4.2-ure
Obsoletes: libreoffice4.2-writer

# $ rpm -qa --qf "Obsoletes: %{name}\n" | grep -e "libreoffice" -e "libobasis" | sort
Obsoletes: libobasis4.3-base
Obsoletes: libobasis4.3-calc
Obsoletes: libobasis4.3-core01
Obsoletes: libobasis4.3-core02
Obsoletes: libobasis4.3-core03
Obsoletes: libobasis4.3-core04
Obsoletes: libobasis4.3-core05
Obsoletes: libobasis4.3-core06
Obsoletes: libobasis4.3-core07
Obsoletes: libobasis4.3-draw
Obsoletes: libobasis4.3-en-US
Obsoletes: libobasis4.3-en-US-base
Obsoletes: libobasis4.3-en-US-calc
Obsoletes: libobasis4.3-en-US-math
Obsoletes: libobasis4.3-en-US-res
Obsoletes: libobasis4.3-en-US-writer
Obsoletes: libobasis4.3-extension-beanshell-script-provider
Obsoletes: libobasis4.3-extension-javascript-script-provider
Obsoletes: libobasis4.3-extension-mediawiki-publisher
Obsoletes: libobasis4.3-extension-nlpsolver
Obsoletes: libobasis4.3-extension-pdf-import
Obsoletes: libobasis4.3-extension-report-builder
Obsoletes: libobasis4.3-filter-data
Obsoletes: libobasis4.3-gnome-integration
Obsoletes: libobasis4.3-graphicfilter
Obsoletes: libobasis4.3-images
Obsoletes: libobasis4.3-impress
Obsoletes: libobasis4.3-ja
Obsoletes: libobasis4.3-ja-base
Obsoletes: libobasis4.3-ja-calc
Obsoletes: libobasis4.3-ja-help
Obsoletes: libobasis4.3-ja-math
Obsoletes: libobasis4.3-ja-res
Obsoletes: libobasis4.3-ja-writer
Obsoletes: libobasis4.3-kde-integration
Obsoletes: libobasis4.3-librelogo
Obsoletes: libobasis4.3-math
Obsoletes: libobasis4.3-ogltrans
Obsoletes: libobasis4.3-onlineupdate
Obsoletes: libobasis4.3-ooofonts
Obsoletes: libobasis4.3-ooolinguistic
Obsoletes: libobasis4.3-postgresql-sdbc
Obsoletes: libobasis4.3-python-script-provider
Obsoletes: libobasis4.3-pyuno
Obsoletes: libobasis4.3-writer
Obsoletes: libobasis4.3-xsltfilter
Obsoletes: libreoffice4.3
Obsoletes: libreoffice4.3-base
Obsoletes: libreoffice4.3-calc
Obsoletes: libreoffice4.3-dict-en
Obsoletes: libreoffice4.3-dict-es
Obsoletes: libreoffice4.3-dict-fr
Obsoletes: libreoffice4.3-draw
Obsoletes: libreoffice4.3-en-US
Obsoletes: libreoffice4.3-freedesktop-menus
Obsoletes: libreoffice4.3-impress
Obsoletes: libreoffice4.3-ja
Obsoletes: libreoffice4.3-math
Obsoletes: libreoffice4.3-ure
Obsoletes: libreoffice4.3-writer

# $ rpm -qa --qf "Obsoletes: %{name}\n" | grep -e "libreoffice" -e "libobasis" | sort
Obsoletes: libobasis4.4-base
Obsoletes: libobasis4.4-calc
Obsoletes: libobasis4.4-core
Obsoletes: libobasis4.4-draw
Obsoletes: libobasis4.4-en-US
Obsoletes: libobasis4.4-en-US-base
Obsoletes: libobasis4.4-en-US-calc
Obsoletes: libobasis4.4-en-US-math
Obsoletes: libobasis4.4-en-US-res
Obsoletes: libobasis4.4-en-US-writer
Obsoletes: libobasis4.4-extension-beanshell-script-provider
Obsoletes: libobasis4.4-extension-javascript-script-provider
Obsoletes: libobasis4.4-extension-mediawiki-publisher
Obsoletes: libobasis4.4-extension-nlpsolver
Obsoletes: libobasis4.4-extension-pdf-import
Obsoletes: libobasis4.4-extension-report-builder
Obsoletes: libobasis4.4-filter-data
Obsoletes: libobasis4.4-gnome-integration
Obsoletes: libobasis4.4-graphicfilter
Obsoletes: libobasis4.4-images
Obsoletes: libobasis4.4-impress
Obsoletes: libobasis4.4-ja
Obsoletes: libobasis4.4-ja-base
Obsoletes: libobasis4.4-ja-calc
Obsoletes: libobasis4.4-ja-help
Obsoletes: libobasis4.4-ja-math
Obsoletes: libobasis4.4-ja-res
Obsoletes: libobasis4.4-ja-writer
Obsoletes: libobasis4.4-kde-integration
Obsoletes: libobasis4.4-librelogo
Obsoletes: libobasis4.4-math
Obsoletes: libobasis4.4-ogltrans
Obsoletes: libobasis4.4-onlineupdate
Obsoletes: libobasis4.4-ooofonts
Obsoletes: libobasis4.4-ooolinguistic
Obsoletes: libobasis4.4-postgresql-sdbc
Obsoletes: libobasis4.4-python-script-provider
Obsoletes: libobasis4.4-pyuno
Obsoletes: libobasis4.4-writer
Obsoletes: libobasis4.4-xsltfilter
Obsoletes: libreoffice4.4
Obsoletes: libreoffice4.4-base
Obsoletes: libreoffice4.4-calc
Obsoletes: libreoffice4.4-dict-en
Obsoletes: libreoffice4.4-dict-es
Obsoletes: libreoffice4.4-dict-fr
Obsoletes: libreoffice4.4-draw
Obsoletes: libreoffice4.4-en-US
Obsoletes: libreoffice4.4-freedesktop-menus
Obsoletes: libreoffice4.4-impress
Obsoletes: libreoffice4.4-ja
Obsoletes: libreoffice4.4-math
Obsoletes: libreoffice4.4-ure
Obsoletes: libreoffice4.4-writer

# $ rpm -qa --qf "Obsoletes: %{name}\n" | grep -e "libreoffice" -e "libobasis" | sort
Obsoletes: libobasis5.0-base
Obsoletes: libobasis5.0-calc
Obsoletes: libobasis5.0-core
Obsoletes: libobasis5.0-draw
Obsoletes: libobasis5.0-en-US
Obsoletes: libobasis5.0-en-US-base
Obsoletes: libobasis5.0-en-US-calc
Obsoletes: libobasis5.0-en-US-math
Obsoletes: libobasis5.0-en-US-res
Obsoletes: libobasis5.0-en-US-writer
Obsoletes: libobasis5.0-extension-beanshell-script-provider
Obsoletes: libobasis5.0-extension-javascript-script-provider
Obsoletes: libobasis5.0-extension-mediawiki-publisher
Obsoletes: libobasis5.0-extension-nlpsolver
Obsoletes: libobasis5.0-extension-pdf-import
Obsoletes: libobasis5.0-extension-report-builder
Obsoletes: libobasis5.0-filter-data
Obsoletes: libobasis5.0-gnome-integration
Obsoletes: libobasis5.0-graphicfilter
Obsoletes: libobasis5.0-images
Obsoletes: libobasis5.0-impress
Obsoletes: libobasis5.0-ja
Obsoletes: libobasis5.0-ja-base
Obsoletes: libobasis5.0-ja-calc
Obsoletes: libobasis5.0-ja-help
Obsoletes: libobasis5.0-ja-math
Obsoletes: libobasis5.0-ja-res
Obsoletes: libobasis5.0-ja-writer
Obsoletes: libobasis5.0-kde-integration
Obsoletes: libobasis5.0-librelogo
Obsoletes: libobasis5.0-math
Obsoletes: libobasis5.0-ogltrans
Obsoletes: libobasis5.0-onlineupdate
Obsoletes: libobasis5.0-ooofonts
Obsoletes: libobasis5.0-ooolinguistic
Obsoletes: libobasis5.0-postgresql-sdbc
Obsoletes: libobasis5.0-python-script-provider
Obsoletes: libobasis5.0-pyuno
Obsoletes: libobasis5.0-writer
Obsoletes: libobasis5.0-xsltfilter
Obsoletes: libreoffice5.0
Obsoletes: libreoffice5.0-base
Obsoletes: libreoffice5.0-calc
Obsoletes: libreoffice5.0-dict-en
Obsoletes: libreoffice5.0-dict-es
Obsoletes: libreoffice5.0-dict-fr
Obsoletes: libreoffice5.0-draw
Obsoletes: libreoffice5.0-en-US
Obsoletes: libreoffice5.0-freedesktop-menus
Obsoletes: libreoffice5.0-impress
Obsoletes: libreoffice5.0-ja
Obsoletes: libreoffice5.0-math
Obsoletes: libreoffice5.0-ure
Obsoletes: libreoffice5.0-writer

Packager:	kazutaka, munepi, ara_t

%description
LibreOffice is the free power-packed Open Source personal productivity 
suite for Windows, Macintosh and Linux, that gives you six feature-rich 
applications for all your document production and data processing needs: 
Writer, Calc, Impress, Draw, Math and Base. 

If you install this package, it automaticaly downloads 
required files to install %{pkgname}.
And the downloaded files are automatically installed if 
installation is executed by apt-get command or synaptic
package manager.

%description -l ja
LibreOffice は自由でかつオープンソースのオフィススイートです。
Windows、Macintosh、Linux を始めとする多くのプラットフォームで動作します。
文書の作成やデータの処理のお役に立ちます豊富な機能を備えた6つの
アプリケーションを提供します:
Writer、Calc、Impress、Draw、Math、Base です。

このパッケージをインストールすると、自動的に %{pkgname}
のインストールに必要な rpm ファイルをダウンロードします。
また apt-get コマンドや synapticパッケージマネージャから実行
した場合は、ダウンロードした rpm ファイルのインストールも自
動的に行います。

%install
%__mkdir_p %{buildroot}%{_bindir}
(cd %{buildroot}%{_bindir}
  %__ln_s -f libreoffice%{major_version} libreoffice
)

%posttrans
#set -x
## setup
. /etc/self-build.conf
tmp=$(mktemp -d ${TEMP_DIR}/%{name}.XXXXXX)
QUEDIR=/var/cache/self-build
[ ! -d ${QUEDIR} ] && %__mkdir_p ${QUEDIR}

(cd ${tmp}
    ## If the cached tarballs exist, copy them into ${tmp}
    if [ "${CACHE_DOWNLOADED_FILES}" = "yes" ]; then
       for i in %{dlurl}; do 
       	   [ -f ${QUEDIR}/$(basename $i) ] && %__cp -af ${QUEDIR}/$(basename $i) ${tmp}; done
    fi
    ## download the official built tarballs
    wget -N %{dlurl}

    ## extract them
    for i in %{dlurl}; do %__tar xf $(basename $i); done

    ## copy including rpms
    %__cp -af $(find -name "*.%{rpmarch}.rpm") ${QUEDIR}
    %__cp -af $(find -name "*freedesktop-menus*.rpm") ${QUEDIR}

    if [ "${CACHE_DOWNLOADED_FILES}" = "yes" ]; then
       for i in %{dlurl}; do 
       	   [ -f ${QUEDIR}/$(basename $i) ] || %__cp -af $(basename $i) ${QUEDIR}; 
       done
    fi
)
%__rm -rf ${tmp}

%files
%defattr(-,root,root)
%{_bindir}/libreoffice


%changelog
* Sun Jun 26 2016 Toshiaki Ara <ara_t@384.jp> 5.1.4-1
- update to 5.1.4

* Fri May 20 2016 Toshiaki Ara <ara_t@384.jp> 5.1.3-1
- update to 5.1.3

* Mon Apr 11 2016 Toshiaki Ara <ara_t@384.jp> 5.1.2-1
- update to 5.1.2

* Fri Feb 19 2016 Toshiaki Ara <ara_t@384.jp> 5.0.5-1
- new upstream release

* Mon Dec 21 2015 Toshiaki Ara <ara_t@384.jp> 5.0.4-1
- new upstream release

* Sat Dec  5 2015 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.3-1
- new upstream release

* Sat Oct 10 2015 Munehiro Yamamoto <munepi@vinelinux.org> 5.0.2-1
- new upstream release
- changed the primary %%baseurl to http://mirrors.vinelinux.org

* Sat Aug  8 2015 Munehiro Yamamoto <munepi@vinelinux.org> 4.4.5-1
- new upstream release
- added Requires: mesa-libGLU

* Thu Jul 16 2015 Munehiro Yamamoto <munepi@vinelinux.org> 4.4.4-1
- new upstream release

* Sun May 24 2015 Munehiro Yamamoto <munepi@vinelinux.org> 4.4.3-1
- new upstream release

* Thu May  7 2015 Munehiro Yamamoto <munepi@vinelinux.org> 4.4.2-1
- new upstream release

* Sun Mar 22 2015 Munehiro Yamamoto <munepi@vinelinux.org> 4.4.1-1
- new upstream release

* Fri Jan 30 2015 Munehiro Yamamoto <munepi@vinelinux.org> 4.4.0-1
- new upstream release
- make the symbolic link libreoffice -> /usr/bin/libreofficeX.Y in /usr/bin

* Fri Dec 19 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.3.5-1
- new upstream release 

* Tue Nov  4 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.3.3-1
- new upstream release

* Wed Oct  8 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.3.2-1
- new upstream release

* Tue Sep  2 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.3.1-1
- new upstream release

* Mon Aug 18 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.3.0-1
- new upstream release

* Fri Aug 15 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.2.6-1
- new upstream release

* Sun Jul  6 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.2.5-1
- new upstream release

* Wed May 14 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.2.4-1
- new upstream release

* Thu Apr 24 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.2.3-1
- new upstream release

* Sun Apr  6 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.2.2-1
- new upstream release

* Sat Feb 15 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.1.5-1
- new upstream release

* Thu Jan  2 2014 Munehiro Yamamoto <munepi@vinelinux.org> 4.1.4-1
- new upstream release

* Thu Nov 21 2013 Munehiro Yamamoto <munepi@vinelinux.org> 4.1.3-1
- new upstream release

* Sat Oct  5 2013 Munehiro Yamamoto <munepi@vinelinux.org> 4.1.2-1
- new upstream release

* Wed Sep 11 2013 Munehiro Yamamoto <munepi@vinelinux.org> 4.1.1-1
- new upstream release

* Wed Aug 28 2013 Munehiro Yamamoto <munepi@vinelinux.org> 4.1.0-1
- new upstream release

* Sat Jul 13 2013 Munehiro Yamamoto <munepi@vinelinux.org> 4.0.4-1
- new upstream release

* Wed May 15 2013 Munehiro Yamamoto <munepi@vinelinux.org> 4.0.3-1
- new upstream release

* Fri Apr  5 2013 Munehiro Yamamoto <munepi@vinelinux.org> 4.0.2-1
- new upstream release

* Thu Mar  7 2013 Munehiro Yamamoto <munepi@vinelinux.org> 4.0.1-1
- new upstream release

* Sun Feb 10 2013 Munehiro Yamamoto <munepi@vinelinux.org> 4.0.0-1
- new upstream release

* Wed Jan 30 2013 Munehiro Yamamoto <munepi@vinelinux.org> 3.6.5-1
- new upstream release

* Fri Dec  7 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.6.4-1
- new upstream release

* Fri Nov  2 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.6.3-1
- new upstream release

* Tue Oct 23 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.6.2-1
- new upstream release

* Wed Aug 29 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.6.1-1
- new upstream release

* Sat Aug 11 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.6.0-2
- Requires: java >= 1.6.0
- set LibreOffice 3.5 packages as Obsoletes

* Fri Aug 10 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.6.0-1
- new upstream release

* Wed Jul 25 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.5.5-1
- new upstream release

* Fri Jun  1 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.5.4-1
- new upstream release

* Sat May 12 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.5.3-1
- new upstream release

* Mon Apr 30 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.5.2-2
- set LibreOffice 3.4 packages as Obsoletes

* Wed Apr 11 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.5.2-1
- new upstream release

* Thu Mar 22 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.5.1-1
- new upstream release

* Thu Feb 16 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.5.0-1
- new upstream release

* Tue Jan 17 2012 Munehiro Yamamoto <munepi@vinelinux.org> 3.4.5-1
- new upstream release

* Wed Nov  9 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.4.4-1
- new upstream release

* Sun Oct 16 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.4.3-2
- dropped Requires: libgail-gnome >= 1.8.6

* Sat Sep 03 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.4.3-1
- new upstream release

* Tue Aug 02 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.4.2-1
- new upstream release

* Fri Jul 22 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.4.1-2
- added Requires: java-1.6.0 <BTS:1168>

* Wed Jul 06 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.4.1-1
- new upstream release

* Sat Jun 11 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.4.0-1
- new upstream release

* Sun Apr 03 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.3.2-1
- initial build
