source: trunk/debbuild.spec@ 169

Last change on this file since 169 was 169, checked in by kdeugau, 12 years ago

/trunk

Light tweak on the .spec to reflect the GPL2+ header
Add bash as a dependency in the .spec file, so we can use /bin/bash

in scriptlets. Debian's migration of /bin/sh -> /bin/dash has
turned out to have some very unfortunate effects on scriptlets...

Trim empty lines and comment lines from %files sections
Typofix a warning
Tighten up build-dependency checking:

  • add a ##fixme to ponder regarding the exact syntax for the entries
  • find a workable way to detect if virtual packages are installed, at least for this week

Extend the characters checked for in sonames for auto-requires
Expand a newly-found macro "buildsubdir" -> %_topdir/BUILD/<tarball-dir>

  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# $Id: debbuild.spec 169 2012-09-13 20:15:44Z kdeugau $
2# Refer to the following for more info on .spec file syntax:
3# http://www.rpm.org/max-rpm/
4# http://www.rpm.org/max-rpm-snapshot/ (Updated version of above)
5# http://docs.fedoraproject.org/drafts/rpm-guide-en/
6# More links may be available from http://www.rpm.org
7
8# A collection of magic to set the release "number" such that dist upgrades will, erm, upgrade.
9# NB: This really only applies to packages built with debbuild.
10%if %{?debdist:0}%{?!debdist:1}
11%define debdist etch
12%endif
13%if "%{debdist}" == "sarge"
14%define errata 0
15%endif
16%if "%{debdist}" == "dapper"
17%define errata 1
18%endif
19%if "%{debdist}" == "etch"
20%define errata 2
21%endif
22%if "%{debdist}" == "lenny"
23%define errata 3
24%endif
25if "%{debdist}" == "squeeze"
26%define errata 4
27%endif
28if "%{debdist}" == "wheezy"
29%define errata 5
30%endif
31%if %{?relnum:0}%{?!relnum:1}
32%define relnum 1
33%endif
34
35# %{_vendor} is only set to "redhat" on Red Hat (Enterprise) Linux and direct
36# derivatives/ancestors (eg Fedora Core). Upstream rpm (as packaged in Debian,
37# for instance) sets it to "rpm". debbuild sets it to "debbuild".
38%if %{_vendor} == "redhat"
39%define errata el4
40%define release %{relnum}.%{errata}
41%else
42%define release %{relnum}.%{errata}%{debdist}
43%endif
44
45Summary: Build Debian-compatible .deb packages from RPM .spec files
46Name: debbuild
47Version: #VERSION#
48Release: %{release}
49Source: http://www.deepnet.cx/debbuild/debbuild-%{version}.tar.gz
50Group: Development/Tools
51License: GPLv2+
52Packager: Kris Deugau <kdeugau@deepnet.cx>
53Requires: perl, build-essential, pax, fakeroot, bash
54%if %{_vendor} == "debbuild"
55Recommends: patch, bzip2
56Suggests: rpm, subversion
57%endif
58BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
59BuildArch: noarch
60
61%description
62debbuild attempts to build Debian-friendly semi-native packages from
63RPM spec files, RPM-friendly tarballs, and RPM source packages
64(.src.rpm files). It accepts most of the options rpmbuild does, and
65should be able to interpret most spec files usefully. Perl modules
66should be handled via CPAN+dh-make-perl instead as it's simpler
67than even tweaking a .spec template.
68
69Note that patch is not strictly required unless you have .spec files
70with %patch directives, and RPM is not required unless you wish to
71rebuild .src.rpm source packages as .deb binary packages.
72
73%prep
74# Steps to unpack and patch source as needed
75%setup -q
76
77%build
78# nothing to do here
79
80%install
81# Steps to install to a temporary location for packaging
82[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
83make install DESTDIR=$RPM_BUILD_ROOT
84
85# Fill in the pathnames to be packaged here
86%files
87%{_bindir}/*
88%{_mandir}/man8/*
89
90%changelog
91* Thu Feb 28 2008 Kris Deugau <kdeugau@deepnet.cx> -1
92- Initial package
Note: See TracBrowser for help on using the repository browser.