pkgbuild/pkgbuild.spec
author Alex Viskovatoff <herzen@imap.cc>
Sun, 17 Jul 2011 03:06:02 +0100
changeset 11 7002e18f9aec
parent 6 678173477765
permissions -rw-r--r--
Make pkgbuild recognize runtime/gcc as satisfied build dependency Add getcopyright.py

#
# spec file for package SFEpkgbuild
#

# NOTE: To make the unpatched pkgbuild find the patches, use
#	pkgtool build --patches=patches/pkgbuild experimental/SFEpkgbuild.spec
  
# Vanilla pkgbuild's default install prefix is /opt/pkgbuild
# We follow the SFE convention of installing in /usr
# Use pkgbuild --define 'pkgbuild_prefix /path/to/dir'
# to define a different install prefix.

%{?!pkgbuild_prefix:%define pkgbuild_prefix /usr}
%define _prefix %{pkgbuild_prefix}

%define srcname pkgbuild
%define _pkg_docdir %_docdir/%srcname
%include packagenamemacros.inc

Name:         SFEpkgbuild
IPS_Package_Name: package/pkgbuild
License:      GPL
Group:        Development/Tools
URL:	      http://pkgbuild.sourceforge.net/
Version:      1.3.103
Release:      1
BuildArch:    noarch
Vendor:	      OpenSolaris Community
Summary:      rpmbuild-like tool for building Solaris packages
Source:       http://prdownloads.sourceforge.net/pkgbuild/pkgbuild-%{version}.tar.bz2

# First three patches are taken from oi-cbe
Patch1:       pkgbuild/pkgbuild-01-add-unknown-dependencies.patch
Patch2:       pkgbuild/pkgbuild-02-nopkg.patch
Patch3:       pkgbuild/pkgbuild-03-forcefully-copy-docs.patch
# Next three patches are taken from here:
# http://solaris.bionicmutton.org/hg/kde4-specs-460/file/d57ba60c50da/setup/common/patches
Patch4:       pkgbuild/pkgbuild-04-patchdir.diff
#Patch2:       pkgbuild/pkgbuild-postprocess-debug-separate.diff
#Patch3:       pkgbuild/pkgbuild-local.diff
Patch5:       pkgbuild/pkgbuild-05-xz.diff
# Next patch taken from http://sourceforge.net/tracker/index.php?func=detail&aid=3166269&group_id=125443&atid=702474
Patch6:       pkgbuild/ips-facets.patch
Patch7:       pkgbuild/distro-redefine-tags.diff
Patch8:       pkgbuild/no-source-packages.diff
BuildRoot:    %{_tmppath}/%{name}-%{version}-build

%if %_is_pkgbuild
#SUNW_Pkg:                  SFpkgbuild
SUNW_MaxInst:              1000
SUNW_BaseDir:              %{pkgbuild_prefix}
SUNW_Copyright:            http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
# OpenSolaris IPS Package Manifest Fields
Meta(info.upstream):	 	Laszlo (Laca) Peter <[email protected]>
Meta(info.maintainer):	 	Laszlo (Laca) Peter <[email protected]>
Meta(info.repository_url):	http://pkgbuild.cvs.sourceforge.net/viewvc/pkgbuild/pkgbuild/
Meta(info.classification):	org.opensolaris.category.2008:System/Packaging
%endif

%ifos Solaris
Requires:     SUNWbash
Requires:     %pnm_requires_perl_default
Requires:     library/perl-5/xml-xpath
Requires:     SUNWgpch
%else
Requires:     perl >= 5.0.0
Requires:     patch
%endif

%description
A tool for building Solaris SVr4 packages based on RPM spec files.
Most features and some extensions of the spec format are implemented.

%prep
%setup -q -n pkgbuild-%version
%patch1 -p1
%patch2 -p1
%patch3 -p1
# Descriptions of patches 2 and 3 are taken from here:
# http://solaris.bionicmutton.org/hg/kde4-specs-460/file/ed3b4f8dbad1/setup/common/install-pkgbuild
# patch letting pkgtool find patches in subdirectories
%patch4
# patch for separating debug files
#%patch2 -p1
# patch for publishing to a local repository via the file protocol
#%patch3
# patch to make pkgbuild recognize xz compressed archives
%patch5
%patch6 -p1
# patch to get IPS_package_name tags from packages.xml and set them
%patch7 -p1
# stop pkgtool from building source packages
# Originally, pkgtool called pkgbuild with -bb, not -ba. Really, an option controlling this should be added.
%patch8 -p1

%build
./configure --prefix=%{pkgbuild_prefix} --docdir=%_docdir/%srcname
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-, root, bin)
%doc COPYING AUTHORS NEWS
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/doc
%attr (0755, root, bin) %{_bindir}
%attr (0755, root, bin) %{_libdir}
%{_datadir}/%{srcname}
%{_mandir}

%changelog
* Mon Jun 27 2911 - Alex Viskovatoff <[email protected]>
- add patch to correctly set dependencies on renamed SFE packages
  to distro-redefine-tags.diff 
* Sat Jun 25 2011 - Alex Viskovatoff <[email protected]>
- set facet.<name> tag correctly
* Wed Jun 22 2011 - Alex Viskovatoff <[email protected]>
- get ips_package_name from packages.xml
- stop pkgtool from building source packages
* Sun Apr 10 2011 - Alex Viskovatoff <[email protected]>
- add patches from oi-cbe, rearranging patches
* Sat Apr  2 2011 - Alex Viskovatoff <[email protected]>
- bump to 1.3.104 pre-release, creating a custom tarball with ./configure in it
- disable patches 2 and 3, since we don't use their functionality
* Fri Apr  1 2011 - Alex Viskovatoff <[email protected]>
- new experimental SFEpkgbuild.spec, using 4 patches
* Tue Jun 22 2010 - [email protected]
- updated %files for new doc and man pages
* Fri Apr 17 2009 - [email protected]
- add IPS Meta tags
* Fri Aug 11 2006 - <[email protected]>
- delete topdir stuff, we have per-user topdirs now
* Mon Aug 08 2005 - <[email protected]>
- add GNU Patch dependency
* Thu Dec 09 2004 - <[email protected]>
- Remove %topdir/* from the pkgmap and create these directories in %post
* Fri Mar 05 2004 - <[email protected]>
- fix %files
* Wed Jan 07 2004 - <[email protected]>
- initial version of the spec file