William Benton 6f3133f
%global pkg_version 0.9.1
William Benton 6f3133f
%global fb303_version 1.0.0_dev
William Benton ffe9647
%global pkg_rel 15
William Benton 6f3133f
William Benton 6f3133f
%global py_version 2.7
William Benton 6f3133f
William Benton 6f3133f
%global php_extdir  %(php-config --extension-dir 2>/dev/null || echo "undefined")
William Benton 6f3133f
William Benton 6f3133f
%{?perl_default_filter}
William Benton 6f3133f
%global __provides_exclude_from ^(%{python_sitearch}/.*\\.so|%{php_extdir}/.*\\.so)$
William Benton 6f3133f
William Benton 6f3133f
%global have_mongrel 0
William Benton 6f3133f
William Benton ffe9647
%if 0%{?fedora} >= 19 && 0%{?fedora} < 21
William Benton ffe9647
# erlang-jsx is available in F19 but orphaned in F22
William Benton 6f3133f
%global have_jsx 1
William Benton 6f3133f
%else
William Benton 6f3133f
%global have_jsx 0
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
# We should be able to enable this in the future
William Benton 6f3133f
%global want_d 0
William Benton 6f3133f
William Benton 6f3133f
# Thrift's Ruby support depends on Mongrel.  Since Mongrel is
William Benton 6f3133f
# deprecated in Fedora, we can't support Ruby bindings for Thrift
William Benton 6f3133f
# unless and until Thrift is patched to use a different HTTP server.
William Benton 6f3133f
%if 0%{?have_mongrel} == 0
William Benton 6f3133f
%global ruby_configure --without-ruby
William Benton 6f3133f
%global with_ruby 0
William Benton 6f3133f
%else
William Benton 6f3133f
%global ruby_configure --with-ruby
William Benton 6f3133f
%global want_ruby 1
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
# Thrift's Erlang support depends on the JSX library, which is not
William Benton 6f3133f
# currently available in Fedora.
William Benton 6f3133f
William Benton 6f3133f
%if 0%{?have_jsx} == 0
William Benton 6f3133f
%global erlang_configure --without-erlang
William Benton 6f3133f
%global want_erlang 0
William Benton 6f3133f
%else
William Benton 6f3133f
%global erlang_configure --with-erlang
William Benton 6f3133f
%global want_erlang 1
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
# PHP appears broken in Thrift 0.9.1
William Benton 6f3133f
%global want_php 0
William Benton 6f3133f
William Benton 6f3133f
%if 0%{?want_php} == 0
William Benton 6f3133f
%global php_langname %{nil}
William Benton 6f3133f
%global php_configure --without-php
William Benton 6f3133f
%else
William Benton 6f3133f
%global php_langname PHP,\ 
William Benton 6f3133f
%global php_configure --with-php
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
# Thrift's GO support doesn't build under Fedora
William Benton 6f3133f
%global want_golang 0
William Benton 6f3133f
%global golang_configure --without-go
William Benton 6f3133f
William Benton 6f3133f
Name:		thrift
William Benton 6f3133f
Version:	%{pkg_version}
7aebe13
Release:	%{pkg_rel}%{?dist}
William Benton 6f3133f
Summary:	Software framework for cross-language services development
William Benton 6f3133f
William Benton 6f3133f
# Parts of the source are used under the BSD and zlib licenses, but
William Benton 6f3133f
# these are OK for inclusion in an Apache 2.0-licensed whole:
William Benton 6f3133f
# http://www.apache.org/legal/3party.html
William Benton 6f3133f
William Benton 6f3133f
# Here's the breakdown:
William Benton 6f3133f
# thrift-0.9.1/lib/py/compat/win32/stdint.h is 2-clause BSD
William Benton 6f3133f
# thrift-0.9.1/compiler/cpp/src/md5.[ch] are zlib
William Benton 6f3133f
License:	ASL 2.0 and BSD and zlib
William Benton 6f3133f
URL:		http://thrift.apache.org/
William Benton 6f3133f
William Benton 6f3133f
%if "%{version}" != "0.9.1"
William Benton 6f3133f
Source0:	http://archive.apache.org/dist/%{name}/%{version}/%{name}-%{version}.tar.gz
William Benton 6f3133f
%else
William Benton 6f3133f
# Unfortunately, the distribution tarball for thrift-0.9.1 is broken, so we're
William Benton 6f3133f
# using an exported tarball from git.  This will change in the future.
William Benton 6f3133f
William Benton 6f3133f
Source0:	https://github.com/apache/thrift/archive/0.9.1.tar.gz
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
Source1:	http://repo1.maven.org/maven2/org/apache/thrift/lib%{name}/%{version}/lib%{name}-%{version}.pom
William Benton 6f3133f
Source2:	https://raw.github.com/apache/%{name}/%{version}/bootstrap.sh
William Benton 6f3133f
William Benton 6f3133f
Source3:        https://gitorious.org/pkg-scribe/thrift-deb-pkg/raw/master:debian/manpage.1.ex
William Benton 6f3133f
Source4:	http://repo1.maven.org/maven2/org/apache/thrift/libfb303/%{version}/libfb303-%{version}.pom
William Benton 6f3133f
William Benton 6f3133f
# this patch is adapted from Gil Cattaneo's thrift-0.7.0 package
William Benton 6f3133f
Patch0:		thrift-0.9.1-buildxml.patch
William Benton 6f3133f
# don't use bundled rebar executable
William Benton 6f3133f
Patch1:		thrift-0.9.1-rebar.patch
William Benton 6f3133f
# for fb303, excise maven ant tasks; build against system libraries; etc.
William Benton 6f3133f
Patch2:		fb303-0.9.1-buildxml.patch
William Benton 6f3133f
William Benton 6f3133f
Group:		Development/Libraries
William Benton 6f3133f
William Benton 6f3133f
# BuildRequires for language-specific bindings are listed under these
William Benton 6f3133f
# subpackages, to facilitate enabling or disabling individual language
William Benton 6f3133f
# bindings in the future
William Benton 6f3133f
William Benton 6f3133f
BuildRequires:	libstdc++-devel
William Benton 6f3133f
BuildRequires:	boost-devel
William Benton 6f3133f
BuildRequires:	automake
William Benton 6f3133f
BuildRequires:	autoconf
William Benton 6f3133f
BuildRequires:	openssl-devel
William Benton 6f3133f
BuildRequires:	zlib-devel
William Benton 6f3133f
BuildRequires:	bison-devel
William Benton 6f3133f
BuildRequires:	flex-devel
William Benton 6f3133f
BuildRequires:	glib2-devel
William Benton 6f3133f
BuildRequires:	texlive
William Benton 6f3133f
BuildRequires:	qt-devel
William Benton 6f3133f
William Benton 6f3133f
BuildRequires:	libtool
William Benton 6f3133f
BuildRequires:	autoconf
William Benton 6f3133f
BuildRequires:	automake
William Benton 6f3133f
William Benton 6f3133f
BuildRequires:	bison
William Benton 6f3133f
BuildRequires:	flex
William Benton 6f3133f
BuildRequires:	bison-devel
William Benton 6f3133f
BuildRequires:	flex-devel
William Benton 6f3133f
William Benton 6f3133f
BuildRequires:	ant
William Benton 6f3133f
William Benton 6f3133f
William Benton 6f3133f
%if 0%{?want_golang} > 0
William Benton 6f3133f
BuildRequires:	golang
William Benton 6f3133f
Requires:	golang
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
%description
William Benton 6f3133f
William Benton 6f3133f
The Apache Thrift software framework for cross-language services
William Benton 6f3133f
development combines a software stack with a code generation engine to
William Benton 6f3133f
build services that work efficiently and seamlessly between C++, Java,
William Benton 6f3133f
Python, %{?php_langname}and other languages.
William Benton 6f3133f
7aebe13
%package	devel
William Benton 6f3133f
Summary:	Development files for %{name}
William Benton 6f3133f
Requires:	%{name}%{?_isa} = %{version}-%{release}
William Benton 6f3133f
Requires:	pkgconfig
William Benton 2f2f8dd
Requires:	boost-devel
William Benton 6f3133f
William Benton 6f3133f
%description	devel
William Benton 6f3133f
The %{name}-devel package contains libraries and header files for
William Benton 6f3133f
developing applications that use %{name}.
William Benton 6f3133f
7aebe13
%package        qt
7aebe13
Summary:        Qt support for %{name}
7aebe13
Requires:       %{name}%{?_isa} = %{version}-%{release}
7aebe13
7aebe13
%description    qt
7aebe13
The %{name}-qt package contains Qt bindings for %{name}.
7aebe13
7aebe13
%package        glib
7aebe13
Summary:        GLib support for %{name}
7aebe13
Requires:       %{name}%{?_isa} = %{version}-%{release}
7aebe13
7aebe13
%description    glib
7aebe13
The %{name}-qt package contains GLib bindings for %{name}.
7aebe13
William Benton 6f3133f
%package -n	python-%{name}
William Benton 6f3133f
Summary:	Python support for %{name}
William Benton 6f3133f
BuildRequires:	python2-devel
William Benton 6f3133f
Requires:	%{name}%{?_isa} = %{version}-%{release}
William Benton 6f3133f
Requires:	python2
William Benton 6f3133f
William Benton 6f3133f
%description -n python-%{name}
William Benton 6f3133f
The python-%{name} package contains Python bindings for %{name}.
William Benton 6f3133f
William Benton 6f3133f
%package -n	perl-%{name}
William Benton 6f3133f
Summary:	Perl support for %{name}
William Benton 6f3133f
Provides:	perl(Thrift) = %{version}-%{release}
William Benton 6f3133f
BuildRequires:	perl(Bit::Vector)
William Benton 6f3133f
BuildRequires:	perl(ExtUtils::MakeMaker)
William Benton 6f3133f
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
William Benton 6f3133f
Requires:	perl(Bit::Vector)
William Benton 6f3133f
Requires:	perl(Encode)
William Benton 6f3133f
Requires:	perl(HTTP::Request)
William Benton 6f3133f
Requires:	perl(IO::Select)
William Benton 6f3133f
Requires:	perl(IO::Socket::INET)
William Benton 6f3133f
Requires:	perl(IO::String)
William Benton 6f3133f
Requires:	perl(LWP::UserAgent)
William Benton 6f3133f
Requires:	perl(POSIX)
William Benton 6f3133f
Requires:	perl(base)
William Benton 6f3133f
Requires:	perl(constant)
William Benton 6f3133f
Requires:	perl(strict)
William Benton 6f3133f
Requires:	perl(utf8)
William Benton 6f3133f
Requires:	perl(warnings)
William Benton 6f3133f
BuildArch:	noarch
William Benton 6f3133f
William Benton 6f3133f
%description -n perl-%{name}
William Benton 6f3133f
The perl-%{name} package contains Perl bindings for %{name}.
William Benton 6f3133f
William Benton 6f3133f
%if %{?want_d}
William Benton 6f3133f
%package -n	d-%{name}
William Benton 6f3133f
Summary:	D support for %{name}
William Benton 6f3133f
BuildRequires:	ldc
William Benton 6f3133f
William Benton 6f3133f
%description -n d-%{name}
William Benton 6f3133f
The d-%{name} package contains D bindings for %{name}.
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
%if 0%{?want_php} != 0
William Benton 6f3133f
%package -n	php-%{name}
William Benton 6f3133f
Summary:	PHP support for %{name}
William Benton 6f3133f
Requires:	%{name}%{?_isa} = %{version}-%{release}
William Benton 6f3133f
Requires:	php(zend-abi) = %{php_zend_api}
William Benton 6f3133f
Requires:	php(api) = %{php_core_api}
William Benton 6f3133f
Requires:	php(language) >= 5.3.0
William Benton 6f3133f
Requires:	php-date
William Benton 6f3133f
Requires:	php-json
William Benton 6f3133f
BuildRequires:	php-devel
William Benton 6f3133f
William Benton 6f3133f
%description -n php-%{name}
William Benton 6f3133f
The php-%{name} package contains PHP bindings for %{name}.
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
%package -n	lib%{name}-javadoc
William Benton 6f3133f
Summary:	API documentation for java-%{name}
William Benton 6f3133f
Requires:	lib%{name}-java = %{version}-%{release}
William Benton 6f3133f
BuildArch:	noarch
William Benton 6f3133f
William Benton 6f3133f
%description -n lib%{name}-javadoc 
William Benton 6f3133f
The lib%{name}-javadoc package contains API documentation for the
William Benton 6f3133f
Java bindings for %{name}.
William Benton 6f3133f
William Benton 6f3133f
%package -n	lib%{name}-java
William Benton 6f3133f
Summary:	Java support for %{name}
William Benton 6f3133f
William Benton 6f3133f
BuildRequires:	java-devel
William Benton 6f3133f
BuildRequires:	javapackages-tools
William Benton 6f3133f
BuildRequires:	apache-commons-codec
William Benton 6f3133f
BuildRequires:	apache-commons-lang
William Benton 6f3133f
BuildRequires:	apache-commons-logging
William Benton 6f3133f
BuildRequires:	httpcomponents-client
William Benton 6f3133f
BuildRequires:	httpcomponents-core
William Benton 6f3133f
BuildRequires:	junit
William Benton 6f3133f
BuildRequires:	log4j
William Benton 6f3133f
BuildRequires:	slf4j
William Benton 6f3133f
BuildRequires:	tomcat-servlet-3.0-api
William Benton 6f3133f
William Benton dc1dbff
Requires:	java-headless >= 1:1.6.0
William Benton 6f3133f
Requires:	javapackages-tools
William Benton 6f3133f
Requires:	mvn(org.slf4j:slf4j-api)
William Benton 6f3133f
Requires:	mvn(commons-lang:commons-lang)
William Benton 6f3133f
Requires:	mvn(org.apache.httpcomponents:httpclient)
William Benton 6f3133f
Requires:	mvn(org.apache.httpcomponents:httpcore)
William Benton 6f3133f
BuildArch:	noarch
William Benton 6f3133f
William Benton 6f3133f
William Benton 6f3133f
%description -n lib%{name}-java
William Benton 6f3133f
The lib%{name}-java package contains Java bindings for %{name}.
William Benton 6f3133f
William Benton 6f3133f
%if 0%{?want_ruby} > 0
William Benton 6f3133f
%package -n	ruby-%{name}
William Benton 6f3133f
Summary:	Ruby support for %{name}
William Benton 6f3133f
Requires:	%{name}%{?_isa} = %{version}-%{release}
William Benton 6f3133f
Requires:	ruby(release)
William Benton 6f3133f
BuildRequires:	ruby-devel
William Benton 6f3133f
William Benton 6f3133f
%description -n ruby-%{name}
William Benton 6f3133f
The ruby-%{name} package contains Ruby bindings for %{name}.
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
%if 0%{?want_erlang} > 0
William Benton 6f3133f
%package -n	erlang-%{name}
William Benton 6f3133f
Summary:	Erlang support for %{name}
William Benton 6f3133f
Requires:	%{name}%{?_isa} = %{version}-%{release}
William Benton 6f3133f
Requires:	erlang
William Benton 6f3133f
Requires:	erlang-jsx
William Benton 6f3133f
BuildRequires:	erlang
William Benton 6f3133f
BuildRequires:	erlang-rebar
William Benton 6f3133f
William Benton 6f3133f
%description -n erlang-%{name}
William Benton 6f3133f
The erlang-%{name} package contains Erlang bindings for %{name}.
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
%package -n fb303
William Benton 6f3133f
Summary:	Basic interface for Thrift services
William Benton 6f3133f
Requires:	%{name}%{?_isa} = %{version}-%{release}
William Benton 6f3133f
William Benton 6f3133f
%description -n fb303
William Benton 6f3133f
fb303 is the shared root of all Thrift services; it provides a
William Benton 6f3133f
standard interface to monitoring, dynamic options and configuration,
William Benton 6f3133f
uptime reports, activity, etc.
William Benton 6f3133f
William Benton 6f3133f
%package -n fb303-devel
William Benton 6f3133f
Summary:	Development files for fb303
William Benton 6f3133f
Requires:	fb303%{?_isa} = %{version}-%{release}
William Benton 6f3133f
William Benton 6f3133f
%description -n fb303-devel
William Benton 6f3133f
The fb303-devel package contains header files for fb303
William Benton 6f3133f
William Benton 6f3133f
%package -n python-fb303
William Benton 6f3133f
Summary:	Python bindings for fb303
William Benton 6f3133f
Requires:	fb303%{?_isa} = %{version}-%{release}
William Benton 6f3133f
BuildRequires:	python2-devel
William Benton 6f3133f
William Benton 6f3133f
%description -n python-fb303
William Benton 6f3133f
The python-fb303 package contains Python bindings for fb303.
William Benton 6f3133f
William Benton 6f3133f
%package -n fb303-java
William Benton 6f3133f
Summary:	Java bindings for fb303
William Benton 6f3133f
Requires:	java >= 1:1.6.0
William Benton 6f3133f
Requires:	javapackages-tools
William Benton 6f3133f
Requires:	mvn(org.slf4j:slf4j-api)
William Benton 6f3133f
Requires:	mvn(commons-lang:commons-lang)
William Benton 6f3133f
Requires:	mvn(org.apache.httpcomponents:httpclient)
William Benton 6f3133f
Requires:	mvn(org.apache.httpcomponents:httpcore)
William Benton 6f3133f
BuildArch:	noarch
William Benton 6f3133f
William Benton 6f3133f
%description -n fb303-java
William Benton 6f3133f
The fb303-java package contains Java bindings for fb303.
William Benton 6f3133f
William Benton 6f3133f
%global _default_patch_fuzz 2
William Benton 6f3133f
%prep
William Benton 6f3133f
%setup -q
William Benton 6f3133f
%patch0 -p1
William Benton 6f3133f
%patch1 -p1
William Benton 6f3133f
%patch2 -p1
William Benton 6f3133f
William Benton 6f3133f
%{?!el5:sed -i -e 's/^AC_PROG_LIBTOOL/LT_INIT/g' configure.ac}
William Benton 6f3133f
William Benton 6f3133f
# avoid spurious executable permissions in debuginfo package
William Benton 6f3133f
find . -name \*.cpp -or -name \*.cc -or -name \*.h | xargs -r chmod 644
William Benton 6f3133f
William Benton 6f3133f
cp -p %{SOURCE2} bootstrap.sh
William Benton 6f3133f
William Benton 6f3133f
# work around linking issues
William Benton 6f3133f
echo 'libthrift_c_glib_la_LIBADD = $(GLIB_LIBS) $(GOBJECT_LIBS) -L../cpp/.libs ' >> lib/c_glib/Makefile.am
William Benton 6f3133f
echo 'libthriftqt_la_LIBADD = $(QT_LIBS) -lthrift -L.libs' >> lib/cpp/Makefile.am
William Benton 6f3133f
echo 'libthriftz_la_LIBADD = $(ZLIB_LIBS) -lthrift -L.libs' >> lib/cpp/Makefile.am
William Benton 6f3133f
echo 'EXTRA_libthriftqt_la_DEPENDENCIES = libthrift.la' >> lib/cpp/Makefile.am
William Benton 6f3133f
echo 'EXTRA_libthriftz_la_DEPENDENCIES = libthrift.la' >> lib/cpp/Makefile.am
William Benton 6f3133f
William Benton 6f3133f
# echo 'libfb303_so_LIBADD = -lthrift -L../../../lib/cpp/.libs' >> contrib/fb303/cpp/Makefile.am
William Benton 6f3133f
William Benton 6f3133f
sed -i 's|libfb303_so_LDFLAGS = $(SHARED_LDFLAGS)|libfb303_so_LDFLAGS = $(SHARED_LDFLAGS) -lthrift -L../../../lib/cpp/.libs -Wl,--as-needed|g' contrib/fb303/cpp/Makefile.am
William Benton 6f3133f
William Benton 6f3133f
%build
William Benton 6f3133f
export PY_PREFIX=%{_prefix}
William Benton 6f3133f
export PERL_PREFIX=%{_prefix}
William Benton 6f3133f
export PHP_PREFIX=%{php_extdir}
William Benton 6f3133f
export JAVA_PREFIX=%{_javadir}
William Benton 6f3133f
export RUBY_PREFIX=%{_prefix}
William Benton 6f3133f
export GLIB_LIBS=$(pkg-config --libs glib-2.0)
William Benton 6f3133f
export GLIB_CFLAGS=$(pkg-config --cflags glib-2.0)
William Benton 6f3133f
export GOBJECT_LIBS=$(pkg-config --libs gobject-2.0)
William Benton 6f3133f
export GOBJECT_CFLAGS=$(pkg-config --cflags gobject-2.0)
William Benton 6f3133f
William Benton 6f3133f
find %{_builddir} -name rebar -exec rm -f '{}' \;
William Benton 6f3133f
find . -name Makefile\* -exec sed -i -e 's/[.][/]rebar/rebar/g' {} \;
William Benton 6f3133f
William Benton 6f3133f
# install javadocs in proper places
William Benton 6f3133f
sed -i 's|-Dinstall.javadoc.path=$(DESTDIR)$(docdir)/java|-Dinstall.javadoc.path=$(DESTDIR)%{_javadocdir}/%{name}|' lib/java/Makefile.*
William Benton 6f3133f
William Benton 6f3133f
# build a jar without a version number
William Benton 6f3133f
sed -i 's|${thrift.artifactid}-${version}|${thrift.artifactid}|' lib/java/build.xml
William Benton 6f3133f
William Benton 6f3133f
# Proper permissions for Erlang files
William Benton 6f3133f
sed -i 's|$(INSTALL) $$p|$(INSTALL) --mode 644 $$p|g' lib/erl/Makefile.am
William Benton 6f3133f
William Benton 6f3133f
# Build fb303 jars against the in-situ copy of thrift
William Benton 6f3133f
sed -i 's|$(thrift_home)/bin/thrift|../../../compiler/cpp/thrift|g' \
William Benton 6f3133f
 contrib/fb303/cpp/Makefile.am \
William Benton 6f3133f
 contrib/fb303/py/Makefile.am
William Benton 6f3133f
William Benton 6f3133f
sed -i 's|$(prefix)/lib$|%{_libdir}|g' contrib/fb303/cpp/Makefile.am
William Benton 6f3133f
William Benton 6f3133f
sed -i 's|$(thrift_home)/include/thrift|../../../lib/cpp/src|g' \
William Benton 6f3133f
 contrib/fb303/cpp/Makefile.am
William Benton 6f3133f
William Benton 6f3133f
# Create a straightforward makefile for Java fb303
William Benton 6f3133f
echo "all:
William Benton 6f3133f
	ant
William Benton 6f3133f
install: build/libfb303.jar
William Benton 6f3133f
	mkdir -p %{buildroot}%{_javadir}
William Benton 6f3133f
	/usr/bin/install -c -m 644 build/libfb303.jar %{buildroot}%{_javadir}
William Benton 6f3133f
" > contrib/fb303/java/Makefile
William Benton 6f3133f
William Benton 6f3133f
sh ./bootstrap.sh
William Benton 6f3133f
William Benton 6f3133f
# use unversioned doc dirs where appropriate (via _pkgdocdir macro)
William Benton 6f3133f
%configure --disable-dependency-tracking --disable-static --without-libevent --with-boost=/usr %{ruby_configure} %{erlang_configure} %{golang_configure} %{php_configure} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
William Benton 6f3133f
William Benton 6f3133f
# eliminate unused direct shlib dependencies
William Benton 6f3133f
sed -i -e 's/ -shared / -Wl,--as-needed\0/g' libtool
William Benton 6f3133f
William Benton 6f3133f
make %{?_smp_mflags}
William Benton 6f3133f
William Benton 6f3133f
# build fb303
William Benton 6f3133f
(
William Benton 6f3133f
  cd contrib/fb303
William Benton 6f3133f
  chmod 755 bootstrap.sh
William Benton 6f3133f
  sh bootstrap.sh
William Benton 6f3133f
  %configure --disable-static --with-java --without-php --libdir=%{_libdir}
William Benton 6f3133f
  make %{?_smp_mflags}
William Benton 6f3133f
  (
William Benton 6f3133f
      cd java
William Benton 6f3133f
      ant dist
William Benton 6f3133f
  )
William Benton 6f3133f
)
William Benton 6f3133f
William Benton 6f3133f
%install
William Benton 6f3133f
%make_install
William Benton 6f3133f
find %{buildroot} -name '*.la' -exec rm -f {} ';'
William Benton 6f3133f
find %{buildroot} -name fastbinary.so | xargs -r chmod 755
William Benton 6f3133f
find %{buildroot} -name \*.erl -or -name \*.hrl -or -name \*.app | xargs -r chmod 644
William Benton 6f3133f
William Benton 6f3133f
# install man page
William Benton 6f3133f
mkdir -p %{buildroot}%{_mandir}/man1
William Benton 6f3133f
cp %{SOURCE3} %{buildroot}%{_mandir}/man1/thrift.1
William Benton 6f3133f
gzip -9v %{buildroot}%{_mandir}/man1/thrift.1
William Benton 6f3133f
William Benton 6f3133f
# Remove javadocs jar
William Benton 6f3133f
find %{buildroot}/%{_javadir} -name lib%{name}-javadoc.jar -exec rm -f '{}' \;
William Benton 6f3133f
William Benton 6f3133f
# Add POM file and depmap
William Benton 6f3133f
mkdir -p %{buildroot}%{_mavenpomdir}
William Benton 6f3133f
William Benton 6f3133f
install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-libthrift.pom
William Benton 6f3133f
William Benton 6f3133f
%add_maven_depmap JPP-libthrift.pom libthrift.jar
William Benton 6f3133f
William Benton 6f3133f
# Remove bundled jar files
William Benton 6f3133f
find %{buildroot} -name \*.jar -a \! -name \*thrift\* -exec rm -f '{}' \;
William Benton 6f3133f
William Benton 6f3133f
# Move perl files into appropriate places
William Benton 6f3133f
find %{buildroot} -name \*.pod -exec rm -f '{}' \;
William Benton 6f3133f
find %{buildroot} -name .packlist -exec rm -f '{}' \;
William Benton 6f3133f
find %{buildroot}/usr/lib/perl5 -type d -empty -delete
William Benton 6f3133f
mkdir -p %{buildroot}/%{perl_vendorlib}/
William Benton 6f3133f
mv %{buildroot}/usr/lib/perl5/* %{buildroot}/%{perl_vendorlib}
William Benton 6f3133f
William Benton 6f3133f
%if 0%{?want_php} != 0
William Benton 6f3133f
William Benton 6f3133f
# Move arch-independent php files into the appropriate place
William Benton 6f3133f
mkdir -p %{buildroot}/%{_datadir}/php/
William Benton 6f3133f
mv %{buildroot}/%{php_extdir}/Thrift %{buildroot}/%{_datadir}/php/
William Benton 6f3133f
%endif # want_php
William Benton 6f3133f
William Benton 6f3133f
# Fix permissions on Thread.h
William Benton 6f3133f
find %{buildroot} -name Thread.h -exec chmod a-x '{}' \;
William Benton 6f3133f
William Benton 6f3133f
# install fb303
William Benton 6f3133f
(
William Benton 6f3133f
  cd contrib/fb303
William Benton 6f3133f
  make DESTDIR=%{buildroot} install
William Benton 6f3133f
  (
William Benton 6f3133f
    cd java
William Benton 6f3133f
    ant -Dinstall.path=%{buildroot}%{_javadir} -Dinstall.javadoc.path=%{buildroot}%{_javadocdir}/fb303 install
William Benton 6f3133f
  )
William Benton 6f3133f
)
William Benton 6f3133f
William Benton 6f3133f
# install maven pom and depmaps for fb303
William Benton 6f3133f
install -pm 644 %{SOURCE4} %{buildroot}%{_mavenpomdir}/JPP-libfb303.pom
William Benton 6f3133f
%add_maven_depmap JPP-libfb303.pom libfb303.jar -f "fb303"
William Benton 6f3133f
William Benton 6f3133f
# Ensure all python scripts are executable
William Benton 6f3133f
find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r chmod 755
William Benton 6f3133f
William Benton 6f3133f
William Benton 6f3133f
%post -p /sbin/ldconfig
William Benton 6f3133f
William Benton 6f3133f
%postun -p /sbin/ldconfig
William Benton 6f3133f
William Benton 6f3133f
William Benton 6f3133f
%files
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
%{_bindir}/thrift
7aebe13
%{_libdir}/libthrift-%{version}.so
7aebe13
%{_libdir}/libthriftz-%{version}.so
William Benton 6f3133f
%{_mandir}/man1/thrift.1.gz
William Benton 6f3133f
7aebe13
%files glib
7aebe13
%{_libdir}/libthrift_c_glib.so
7aebe13
%{_libdir}/libthrift_c_glib.so.*
7aebe13
7aebe13
%files qt
7aebe13
%{_libdir}/libthriftqt.so
7aebe13
%{_libdir}/libthriftqt-%{version}.so
7aebe13
William Benton 6f3133f
%files devel
William Benton 6f3133f
%{_includedir}/thrift
William Benton 6f3133f
%exclude %{_includedir}/thrift/fb303
William Benton 6f3133f
%{_libdir}/*.so
William Benton 80f1fe9
%exclude %{_libdir}/lib*-%{version}.so
William Benton 6f3133f
%exclude %{_libdir}/libfb303.so
William Benton 6f3133f
%{_libdir}/pkgconfig/thrift-z.pc
William Benton 6f3133f
%{_libdir}/pkgconfig/thrift-qt.pc
William Benton 6f3133f
%{_libdir}/pkgconfig/thrift.pc
William Benton 6f3133f
%{_libdir}/pkgconfig/thrift_c_glib.pc
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
William Benton 6f3133f
%files -n perl-%{name}
William Benton 6f3133f
%{perl_vendorlib}/Thrift
William Benton 6f3133f
%{perl_vendorlib}/Thrift.pm
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
William Benton 6f3133f
%if 0%{?want_php} != 0
William Benton 6f3133f
%files -n php-%{name}
William Benton 6f3133f
%config(noreplace) /etc/php.d/thrift_protocol.ini
William Benton 6f3133f
%{_datadir}/php/Thrift/
William Benton 6f3133f
%{php_extdir}/thrift_protocol.so
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
%if %{?want_erlang} > 0
William Benton 6f3133f
%files -n erlang-%{name}
William Benton 6f3133f
%{_libdir}/erlang/lib/%{name}-%{version}/
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
%endif
William Benton 6f3133f
William Benton 6f3133f
%files -n python-%{name}
William Benton 6f3133f
%{python_sitearch}/%{name}
William Benton 6f3133f
%{python_sitearch}/%{name}-%{version}-py%{py_version}.egg-info
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
William Benton 6f3133f
%files -n lib%{name}-javadoc
William Benton 6f3133f
%{_javadocdir}/%{name}
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
1514020
%files -n lib%{name}-java -f .mfiles
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
William Benton 6f3133f
%files -n fb303
William Benton 6f3133f
%{_datarootdir}/fb303
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
William Benton 6f3133f
%files -n fb303-devel
William Benton 6f3133f
%{_libdir}/libfb303.so
William Benton 6f3133f
%{_includedir}/thrift/fb303
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
William Benton 6f3133f
%files -n python-fb303
William Benton 6f3133f
%{python_sitelib}/fb303
William Benton 6f3133f
%{python_sitelib}/fb303_scripts
William Benton 6f3133f
%{python_sitelib}/%{name}_fb303-%{fb303_version}-py%{py_version}.egg-info
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
1514020
%files -n fb303-java -f .mfiles-fb303
William Benton 6f3133f
%doc LICENSE NOTICE
William Benton 6f3133f
William Benton 6f3133f
%changelog
William Benton ffe9647
William Benton ffe9647
* Mon Apr 20 2015 Will Benton <willb@redhat.com> - 0.9.1-15
William Benton ffe9647
- Dropped Erlang support for F22 and above, since erlang-jsx is orphaned
William Benton ffe9647
7aebe13
* Wed Apr  8 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.9.1-14
7aebe13
- Split Qt4/GLib runtimes into separate subpackages
7aebe13
- Drop mono support, it's broken and not even shipped (and it pulls mono-core)
7aebe13
Petr Machata f965f68
* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 0.9.1-13.3
Petr Machata f965f68
- Rebuild for boost 1.57.0
Petr Machata f965f68
c187267
* Thu Aug 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.9.1-13.2
c187267
- Perl 5.20 rebuild
c187267
4151a5d
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-13.1
4151a5d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
4151a5d
1514020
* Fri Jun 27 2014 Petr Pisar <ppisar@redhat.com> - 0.9.1-13
1514020
- Use add_maven_depmap-generated file lists (bug #1107448)
1514020
7004fa5
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-12.2
7004fa5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7004fa5
Petr Machata a2e6a68
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 0.9.1-12.1
Petr Machata a2e6a68
- Rebuild for boost 1.55.0
Petr Machata a2e6a68
c4ec814
* Mon May 05 2014 Lubomir Rintel <lkundrak@v3.sk> - 0.9.1-12
c4ec814
- Fix EPEL build
William Benton 2f2f8dd
William Benton dc1dbff
* Fri Feb 21 2014 willb <willb@redhat> - 0.9.1-11
William Benton dc1dbff
- fix BZ 1068561
William Benton dc1dbff
William Benton 2f2f8dd
* Fri Dec 20 2013 willb <willb@redhat> - 0.9.1-10
William Benton 2f2f8dd
- fix BZ 1045544
William Benton 2f2f8dd
William Benton 80f1fe9
* Wed Oct 16 2013 willb <willb@redhat> - 0.9.1-9
William Benton 80f1fe9
- Remove spurious dependencies
William Benton 80f1fe9
- Move some versioned shared libraries from -devel
William Benton 80f1fe9
a429a06
* Wed Oct 16 2013 Dan Horák <dan[at]danny.cz> - 0.9.1-8
a429a06
- Mono available only on selected arches
William Benton 6f3133f
William Benton 6f3133f
* Sun Oct 13 2013 willb <willb@redhat> - 0.9.1-7
William Benton 6f3133f
- minor specfile cleanups
William Benton 6f3133f
William Benton 6f3133f
* Fri Oct 11 2013 willb <willb@redhat> - 0.9.1-6
William Benton 6f3133f
- added thrift man page
William Benton 6f3133f
- integrated fb303
William Benton 6f3133f
- fixed many fb303 library dependency problems
William Benton 6f3133f
William Benton 6f3133f
* Tue Oct 1 2013 willb <willb@redhat> - 0.9.1-5
William Benton 6f3133f
- fixed extension library linking when an older thrift package is not
William Benton 6f3133f
  already installed
William Benton 6f3133f
- fixed extension library dependencies in Makefile
William Benton 6f3133f
William Benton 6f3133f
* Tue Oct 1 2013 willb <willb@redhat> - 0.9.1-4
William Benton 6f3133f
- addresses rpmlint warnings and errors
William Benton 6f3133f
- properly links glib, qt, and z extension libraries
William Benton 6f3133f
William Benton 6f3133f
* Mon Sep 30 2013 willb <willb@redhat> - 0.9.1-3
William Benton 6f3133f
- adds QT support
William Benton 6f3133f
- clarified multiple licensing
William Benton 6f3133f
- uses parallel make
William Benton 6f3133f
- removes obsolete M4 macros
William Benton 6f3133f
- specifies canonical location for source archive
William Benton 6f3133f
William Benton 6f3133f
* Tue Sep 24 2013 willb <willb@redhat> - 0.9.1-2
William Benton 6f3133f
- fixes for i686
William Benton 6f3133f
- fixes bogus requires for Java package
William Benton 6f3133f
William Benton 6f3133f
* Fri Sep 20 2013 willb <willb@redhat> - 0.9.1-1
William Benton 6f3133f
- updated to upstream version 0.9.1
William Benton 6f3133f
- disables PHP support, which FTBFS in this version
William Benton 6f3133f
William Benton 6f3133f
* Fri Sep 20 2013 willb <willb@redhat> - 0.9.0-5
William Benton 6f3133f
- patch build xml to generate unversioned jars instead of moving after the fact
William Benton 6f3133f
- unversioned doc dirs on Fedora versions where this is appropriate
William Benton 6f3133f
- replaced some stray hardcoded paths with macros
William Benton 6f3133f
- thanks to Gil for the above observations and suggestions for fixes
William Benton 6f3133f
William Benton 6f3133f
* Thu Aug 22 2013 willb <willb@redhat> - 0.9.0-4
William Benton 6f3133f
- removed version number from jar name (obs pmackinn)
William Benton 6f3133f
William Benton 6f3133f
* Thu Aug 22 2013 willb <willb@redhat> - 0.9.0-3
William Benton 6f3133f
- Fixes for F19 and Erlang support
William Benton 6f3133f
William Benton 6f3133f
* Thu Aug 15 2013 willb <willb@redhat> - 0.9.0-2
William Benton 6f3133f
- Incorporates feedback from comments on review request
William Benton 6f3133f
William Benton 6f3133f
* Mon Jul 1 2013 willb <willb@redhat> - 0.9.0-1
William Benton 6f3133f
- Initial package