File lsb-buildenv.spec of Package lsb-buildenv

#
# spec file for package lsb-buildenv (Version 4.0)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

%define bzrdate 20081008

Name:           lsb-buildenv
Version:        4.0
Release:        4
Url:            http://www.linuxbase.org/
License:        GPL v2 or later
Group:          Development/Tools/Other
Summary:        Building environment for LSB-compliant applications
Source:         build_env-bzr%{bzrdate}.tar.bz2
Source1:        %{name}-%{version}-rpmlintrc
Source2:        LICENSE
Patch0:         %{name}-%{version}-destdir-prefix.patch
Patch1:         %{name}-%{version}-lsbdev-chroot.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes gcc-c++ zlib-devel
Requires:       lsb
AutoReqProv:    off

%description
Headers, library proxies and tools for building LSB-compliant
applications.



%prep
%setup -q -n build_env
%patch0
%patch1
cp %{S:2} .

%build
for dir in headers lsbdev-cc lsbdev-runner stub_libs; do
    cd $dir
    make %{?jobs:-j%jobs}
    cd ..
done

%install
for dir in headers lsbdev-cc lsbdev-runner stub_libs; do
    cd $dir
    make install DESTDIR=$RPM_BUILD_ROOT PREFIX=/opt/lsb/ BINDIR=bin INCLUDEDIR=include LIBDIR=lib MANDIR=man
    cd ..
done
gzip $RPM_BUILD_ROOT/opt/lsb/man/man1/*.1
chmod a-x $RPM_BUILD_ROOT/opt/lsb/man/man1/*
chmod a-x $RPM_BUILD_ROOT/opt/lsb/lib*/*.a
chmod a-x $RPM_BUILD_ROOT/opt/lsb/lib*/*.o
# save a little space and fix duplicate build-id error
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc LICENSE
%dir /opt/lsb
%dir /opt/lsb/lib
%dir /opt/lsb/lib-*
/opt/lsb/lib-*/*.so
/opt/lsb/lib-*/*.a
/opt/lsb/lib-*/*.o
%dir /opt/lsb/include
/opt/lsb/include/*
%dir /opt/lsb/bin
/opt/lsb/bin/*
%dir /opt/lsb/man
%dir /opt/lsb/man/man1
/opt/lsb/man/man1/*

%changelog
* Mon Nov 24 2008 ro@suse.de
- use fdupes to save a little space
  and fix duplicate build-id error
* Wed Oct 08 2008 prusnak@suse.cz
- updated to bzr checkout from 20081008
* Mon Oct 06 2008 prusnak@suse.cz
- turn AutoReqProv off [bnc#431340]
* Fri Sep 19 2008 prusnak@suse.cz
- created package
  * version 4.0 (bzr checkout from 20080722)
  * based on package from Jiri Dluhos
openSUSE Build Service is sponsored by