1 | # $Id: debbuild.spec 144 2008-06-10 17:00:32Z 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
|
---|
25 | %if %{?relnum:0}%{?!relnum:1}
|
---|
26 | %define relnum 1
|
---|
27 | %endif
|
---|
28 |
|
---|
29 | # %{_vendor} is only set to "redhat" on Red Hat (Enterprise) Linux and direct
|
---|
30 | # derivatives/ancestors (eg Fedora Core). Upstream rpm (as packaged in Debian,
|
---|
31 | # for instance) sets it to "rpm". debbuild sets it to "debbuild".
|
---|
32 | %if %{_vendor} == "redhat"
|
---|
33 | %define errata el4
|
---|
34 | %define release %{relnum}.%{errata}
|
---|
35 | %else
|
---|
36 | %define release %{relnum}.%{errata}%{debdist}
|
---|
37 | %endif
|
---|
38 |
|
---|
39 | Summary: Build Debian-compatible .deb packages from RPM .spec files
|
---|
40 | Name: debbuild
|
---|
41 | Version: #VERSION#
|
---|
42 | Release: %{release}
|
---|
43 | Source: http://www.deepnet.cx/debbuild/debbuild-%{version}.tar.gz
|
---|
44 | Group: Development/Tools
|
---|
45 | License: GPLv2
|
---|
46 | Packager: Kris Deugau <kdeugau@deepnet.cx>
|
---|
47 | Requires: perl, build-essential, pax, fakeroot
|
---|
48 | %if %{_vendor} == "debbuild"
|
---|
49 | Recommends: patch, bzip2
|
---|
50 | Suggests: rpm, subversion
|
---|
51 | %endif
|
---|
52 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
---|
53 | BuildArch: noarch
|
---|
54 |
|
---|
55 | %description
|
---|
56 | debbuild attempts to build Debian-friendly semi-native packages from
|
---|
57 | RPM spec files, RPM-friendly tarballs, and RPM source packages
|
---|
58 | (.src.rpm files). It accepts most of the options rpmbuild does, and
|
---|
59 | should be able to interpret most spec files usefully. Perl modules
|
---|
60 | should be handled via CPAN+dh-make-perl instead as it's simpler
|
---|
61 | than even tweaking a .spec template.
|
---|
62 |
|
---|
63 | Note that patch is not strictly required unless you have .spec files
|
---|
64 | with %patch directives, and RPM is not required unless you wish to
|
---|
65 | rebuild .src.rpm source packages as .deb binary packages.
|
---|
66 |
|
---|
67 | %prep
|
---|
68 | # Steps to unpack and patch source as needed
|
---|
69 | %setup -q
|
---|
70 |
|
---|
71 | %build
|
---|
72 | # nothing to do here
|
---|
73 |
|
---|
74 | %install
|
---|
75 | # Steps to install to a temporary location for packaging
|
---|
76 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
---|
77 | make install DESTDIR=$RPM_BUILD_ROOT
|
---|
78 |
|
---|
79 | # Fill in the pathnames to be packaged here
|
---|
80 | %files
|
---|
81 | %{_bindir}/*
|
---|
82 | %{_mandir}/man8/*
|
---|
83 |
|
---|
84 | %changelog
|
---|
85 | * Thu Feb 28 2008 Kris Deugau <kdeugau@deepnet.cx> -1
|
---|
86 | - Initial package
|
---|