| |
@@ -5,9 +5,9 @@
|
| |
The most common case is where upstream distributes source as a tar.gz, tar.bz2 or zip archive that we can download from an upstream website. In these cases you must use a full URL to the package in the SourceX: line. For example:
|
| |
|
| |
....
|
| |
- Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
| |
+ Source: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
| |
|
| |
- Source0: https://ftp.gnome.org/pub/GNOME/sources/gnome-common/2.12/gnome-common-2.12.0.tar.bz2
|
| |
+ Source: https://ftp.gnome.org/pub/GNOME/sources/gnome-common/2.12/gnome-common-2.12.0.tar.bz2
|
| |
....
|
| |
|
| |
[NOTE]
|
| |
@@ -81,7 +81,7 @@
|
| |
# following commands to generate the tarball:
|
| |
# svn export -r 250 https://www.example.com/svn/foo/trunk foo-20070221
|
| |
# tar -cJvf foo-20070221.tar.xz foo-20070221
|
| |
- Source0: foo-20070221.tar.xz
|
| |
+ Source: foo-20070221.tar.xz
|
| |
....
|
| |
|
| |
When pulling from revision control, please remember to use a Name-version-release compatible with the xref:Versioning.adoc[Versioning] Guidelines. In particular, check the section on xref:Versioning.adoc#_complex_versioning[Complex versioning].
|
| |
@@ -94,7 +94,7 @@
|
| |
From the spec:
|
| |
|
| |
....
|
| |
- Source0: libfoo-1.0-nopatents.tar.gz
|
| |
+ Source: libfoo-1.0-nopatents.tar.gz
|
| |
# libfoo contains patented code that we cannot ship. Therefore we use
|
| |
# this script to remove the patented code before shipping it.
|
| |
# Download the upstream tarball and invoke this script while in the
|
| |
@@ -124,7 +124,7 @@
|
| |
Instead, files.pythonhosted.org can be used trough the `+%{pypi_source}+` macro.
|
| |
|
| |
....
|
| |
- Source0: %{pypi_source}
|
| |
+ Source: %{pypi_source}
|
| |
....
|
| |
|
| |
See more about the macro in the xref:Python.adoc#_source_files_from_pypi[Python guidelines].
|
| |
@@ -134,7 +134,7 @@
|
| |
For packages hosted on sourceforge, use
|
| |
|
| |
....
|
| |
- Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
| |
+ Source: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
| |
....
|
| |
|
| |
changing ".tar.gz" to whatever matches the upstream distribution. Note that we are using downloads.sourceforge.net instead of an arbitrarily chosen mirror. You may use the package name/package version instead of the %\{name} and %\{version} macros, of course.
|
| |
@@ -174,9 +174,9 @@
|
| |
For the source tarball, you can use the following syntax:
|
| |
|
| |
....
|
| |
- Source0: https://github.com/OWNER/PROJECT/archive/%{commit}/%{name}-%{shortcommit}.tar.gz [GitHub]
|
| |
- Source0: https://bitbucket.org/OWNER/PROJECT/get/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz [BitBucket]
|
| |
- Source0: https://gitlab.com/OWNER/PROJECT/-/archive/%{commit}/%{name}-%{shortcommit}.tar.gz [GitLab]
|
| |
+ Source: https://github.com/OWNER/PROJECT/archive/%{commit}/%{name}-%{shortcommit}.tar.gz [GitHub]
|
| |
+ Source: https://bitbucket.org/OWNER/PROJECT/get/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz [BitBucket]
|
| |
+ Source: https://gitlab.com/OWNER/PROJECT/-/archive/%{commit}/%{name}-%{shortcommit}.tar.gz [GitLab]
|
| |
...
|
| |
|
| |
%prep
|
| |
@@ -198,9 +198,9 @@
|
| |
For the source tarball, you can use the following syntax:
|
| |
|
| |
....
|
| |
- Source0: https://github.com/OWNER/PROJECT/archive/%{gittag}/%{name}-%{version}.tar.gz [GitHub]
|
| |
- Source0: https://bitbucket.org/OWNER/PROJECT/get/%{gittag}.tar.gz#/%{name}-%{version}.tar.gz [BitBucket]
|
| |
- Source0: https://gitlab.com/OWNER/PROJECT/-/archive/%{gittag}/%{name}-%{version}.tar.gz [GitLab]
|
| |
+ Source: https://github.com/OWNER/PROJECT/archive/%{gittag}/%{name}-%{version}.tar.gz [GitHub]
|
| |
+ Source: https://bitbucket.org/OWNER/PROJECT/get/%{gittag}.tar.gz#/%{name}-%{version}.tar.gz [BitBucket]
|
| |
+ Source: https://gitlab.com/OWNER/PROJECT/-/archive/%{gittag}/%{name}-%{version}.tar.gz [GitLab]
|
| |
...
|
| |
|
| |
%prep
|
| |
@@ -218,7 +218,7 @@
|
| |
When upstream has URLs for the download that do not end with the tarball name rpm will be unable to parse the tarball out of the source URL. One workaround for many cases is to construct a URL where the tarball is listed in a "URL fragment":
|
| |
|
| |
....
|
| |
- Source0: https://example.com/foo/1.0/download.cgi#/%{name}-%{version}.tar.gz
|
| |
+ Source: https://example.com/foo/1.0/download.cgi#/%{name}-%{version}.tar.gz
|
| |
....
|
| |
|
| |
rpm will then use %\{name}-%\{version}.tar.gz as the tarball name. If you use `+spectool -g foo.spec+` to download the tarball, it will rename the tarball for you.
|
| |
@@ -229,5 +229,5 @@
|
| |
# Mysql has a mirror redirector for its downloads
|
| |
# You can get this tarball by following a link from:
|
| |
# https://dev.mysql.com/downloads/mysql/5.1.html
|
| |
- Source0: mysql-5.1.31.tar.gz
|
| |
+ Source: mysql-5.1.31.tar.gz
|
| |
....
|
| |
See https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.org/thread/BG5SVFAKGNVDJFHGZARABWGW2RRHN22G/
Since RPM 4.15, numbering Sources and Patches is redundant.
I've left the numbers in examples where they matter.