Attached is the spec file for your reference.

Thanks

Lance

On 09/01/12 13:09, Lance Haig wrote:
Hi All,

I am trying to build packages on OBS for some of the new OS's as I need them for a vm I want to build with the admin ui installed.

Unfortunately the build fails as per the attached file.

This happens for a few OS's.

Thanks

Lance


_______________________________________________
Bongo-devel mailing list
[email protected]
https://mail.gna.org/listinfo/bongo-devel

# norootforbuild

%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora}
%define distro_rhlike 1
%endif
%{!?python_sitelib:  %global python_sitelib  %(%__python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%__python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}


Name: bongo-unstable
Summary: Bongo is a calendar and mail server
Version: 1356
Release: 0.1
License: GPL
Group: Productivity/Networking/Email/Servers
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/build-root-%{name}
Url: http://www.bongo-project.org
Packager: Bongo Project <[email protected]>
#Obsoletes: bongo-UNSTABLE bongo bongo-snapshot
#Patch0: bongo-json.patch
#Patch0: store-diff.patch

### Installation dependency requirements
Requires: bongo-unstable-data bongo-unstable-mta
Requires: python-bongo-unstable libbongo-unstable0
Requires: gmime unixODBC python-lxml libgcrypt
%if 0%{?suse_version}
Requires: python-xml openldap2 gnutls
%endif
%if 0%{?distro_rhlike}
Requires: gnutls-utils openldap-servers openldap-clients
%endif

### Build dependency requirements
BuildRequires: cmake bison gettext gnutls-devel python-devel
BuildRequires: pkgconfig gcc-c++ doxygen flex sqlite-devel
BuildRequires: curl-devel gmime-devel libical-devel unixODBC-devel
%if 0%{?suse_version}
BuildRequires: openldap2-devel openldap2 popt-devel python-lxml check update-alternatives libgcrypt-devel
%endif
%if 0%{?distro_rhlike}
BuildRequires: gnutls-devel openldap-devel openldap-servers popt libxml2-python vim-enhanced
%endif

#PreReq: /sbin/ldconfig /usr/sbin/groupadd /usr/sbin/useradd /usr/sbin/update-alternatives coreutils /bin/sed /usr/bin/grep /usr/bin/cmp /bin/fillup

%description 
Bongo is a calendar and mail server. We are focused on building a calendar
and mail server that people love to use, instead of broadly trying to build
a "groupware server" that managers want to deploy.

%lang_package

%package -n %{name}-data
Summary: Data files used by the bongo system
Group: Productivity/Networking/Email/Servers
Requires: %{name} = %{version}
Provides: %{name}-data = %{version}
Packager: Bongo Project <[email protected]>
Obsoletes: bongo-unstable-data bongo-data bongo-snapshot-data

%description -n %{name}-data
Files used by the bongo system to store all system data

%package -n %{name}-mta
Summary: A bongo sendmail implementation
Group: Productivity/Networking/Email/Servers
Requires: %{name} = %{version}
Provides: %{name}-mta = %{version}
Packager: Bongo Project <[email protected]>
Obsoletes: bongo-unstable-mta bongo-mta bongo-snapshot-mta

%description -n %{name}-mta
A bongo sendmail implementation to assist other programs

%package -n python-%{name}
Summary: The python wrapper around libbongo
Group: Productivity/Networking/Email/Servers
Requires: %{name} = %{version}
Provides: python-%{name} = %{version}
Packager: Bongo Project <[email protected]>
Obsoletes: python-bongo-unstable python-bongo

%description -n python-%{name}
Bongo is a calendar and mail server. We are focused on building a calendar
and mail server that people love to use, instead of broadly trying to build
a "groupware server" that managers want to deploy.
The python wrapper around libbongo

%package -n lib%{name}0
Summary: The main bongo libraries
Group: Productivity/Networking/Email/Servers
Requires: %{name} = %{version}
Provides: lib%{name}0 = %{version}
Packager: Bongo Project <[email protected]>
Obsoletes: libbongo-unstable libbongo0-unstable libbongo libbongo0 libbongo-snapshot

%description -n lib%{name}0
The main bongo libraries required to run bongo

%package -n lib%{name}0-devel
Summary: The bongo header files for compiling against the libraries
Group: Productivity/Networking/Email/Servers/Development
Requires: %{name} = %{version}
Provides: lib%{name}0 = %{version}
Packager: Bongo Project <[email protected]>
Obsoletes: libbongo-unstable-dev libbongo-unstable0-devel libbongo0-unstable-devel libbongo-dev libbongo-snapshot-dev 

%description -n lib%{name}0-devel
The bongo header files for compiling against the libraries in Bongo

%prep
%setup -q
#%patch0 -p0

%build
#export CFLAGS="$RPM_OPT_FLAGS"
#export CXXFLAGS="$RPM_OPT_FLAGS"
export SUSE_ASNEEDED=0
cmake \
  -DLIB_INSTALL_DIR=%{_libdir} \
  -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
  -DBONGO_USER=bongo \
  -DDebug=On \
        -DCMAKE_BUILD_TYPE=Debug \
  -DCMAKE_SKIP_RPATH=On \
%if 0%{?centos_version} || 0%{?rhel_version}
  -DSTRICTCOMPILE=Off \
%endif
  .

make VERBOSE=1

%install
make DESTDIR=$RPM_BUILD_ROOT install
#%find_lang bongo-web bongo

#%fdupes %buildroot/%{_datadir}

### OS-dependent init files
%if 0%{?suse_version}
%{__install} -D -m755 init/bongo.init.suse10 -D $RPM_BUILD_ROOT%{_sysconfdir}/init.d/bongo
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
ln -sf %{_sysconfdir}/init.d/bongo $RPM_BUILD_ROOT/%{_sbindir}/rcbongo
%endif
%if 0%{?distro_rhlike}
%{__install} -D -m755 init/bongo.init.fc4 -D $RPM_BUILD_ROOT%{_sysconfdir}/init.d/bongo
%endif

%pre
/usr/sbin/groupadd -r bongo 2> /dev/null || :
/usr/sbin/useradd -r -g bongo -s /bin/false -c "Bongo Mail daemon" -d /etc/bongo bongo 2> /dev/null || :

%post
%{fillup_and_insserv}
/usr/sbin/update-alternatives --install /usr/bin/mailserver mailserver /usr/sbin/bongo-sendmail 115

%post -n lib%{name}0 -p /sbin/ldconfig

%preun
%{stop_on_removal bongo}
/usr/sbin/update-alternatives --remove mailserver /usr/sbin/bongo-sendmail
 
%postun
%{insserv_cleanup}

%postun -n lib%{name}0 -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/file.list.%{name}
rm -rf $RPM_BUILD_DIR/file.list.%{name}.libs
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files.tmp
rm -rf $RPM_BUILD_DIR/file.list.%{name}.dirs

%files -n %{name}
%defattr(-,root,root,0755)
#%{_sbindir}/bongo-backup
%{_sbindir}/bongo-config
%{_sbindir}/bongo-testtool
%{_sbindir}/bongo-manager
%{_sbindir}/bongo-queuetool
%{_sbindir}/bongoantispam
%{_sbindir}/bongoavirus
%{_sbindir}/bongoimap
%{_sbindir}/bongopop3
%{_sbindir}/bongoqueue
%{_sbindir}/bongosmtp
%{_sbindir}/bongosmtpc
%{_sbindir}/bongostore
%{_sbindir}/bongorules
%{_sbindir}/bongo-storetool
%{_sbindir}/bongodirector
#%{_datadir}/locale/fr/LC_MESSAGES/bongo*
#%{_datadir}/locale/pt_BR/LC_MESSAGES/bongo*
%dir %{_datadir}/bongo/conf/
%{_datadir}/bongo/conf/default.set
#%{_datadir}/man/man1/bongo*
#%{_datadir}/man/man8/bongo*
#%{_libdir}/bongo/bongo-storetool.py
%if 0%{?suse_version}
#%dir %{_sysconfdir}/bongo/
%{_sbindir}/rcbongo
%endif
%config(noreplace) %{_sysconfdir}/init.d/bongo

%files -n %{name}-data
%defattr(-,root,root,0755)
%dir %{_datadir}/bongo/
#%{_datadir}/bongo/demo/
%{_datadir}/bongo/zoneinfo/
#%{_datadir}/bongo/examples/

%files -n python-%{name}
%defattr(-,root,root,0755)
%{python_sitelib}/bongo/
%{python_sitearch}/libbongo/

%files -n lib%{name}0
%defattr(-,root,root,0755)
%dir %{_libdir}/bongo-auth/
%{_libdir}/*.so.*
%{_libdir}/bongo-auth/libauthsqlite3*

%files -n lib%{name}0-devel
%defattr(-,root,root,0755)
%{_includedir}/*
%{_libdir}/*.so

%files -n %{name}-mta
%defattr(-,root,root,0755)
%{_sbindir}/bongo-sendmail

%changelog
_______________________________________________
Bongo-devel mailing list
[email protected]
https://mail.gna.org/listinfo/bongo-devel

Reply via email to