/[gentoo-x86]/eclass/obs-download.eclass
Gentoo

Contents of /eclass/obs-download.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Tue Oct 2 10:46:02 2012 UTC (21 months, 1 week ago) by scarabeus
Branch: MAIN
Changes since 1.2: +7 -5 lines
Change the documentation a bit and take OBS_PACKAGE from PN if not set.

1 scarabeus 1.2 # Copyright 1999-2012 Gentoo Foundation
2 miska 1.1 # Distributed under the terms of the GNU General Public License v2
3 scarabeus 1.3 # $Header: /var/cvsroot/gentoo-x86/eclass/obs-download.eclass,v 1.2 2012/08/17 13:04:25 scarabeus Exp $
4 miska 1.1
5     # @ECLASS: obs-download.eclass
6     # @MAINTAINER:
7 scarabeus 1.2 # suse@gentoo.org
8 miska 1.1 # @BLURB: Simplifies downloading from openSUSE Build Service.
9     # @DESCRIPTION:
10     # This eclass constructs OBS_URI based on provided project in openSUSE Build
11     # Service and package name. It can be used by packages/eclasses to download
12     # actual files.
13     #
14     # All you need to do in order to use it is set OBS_PROJECT and OBS_PACKAGE and
15     # inherit this eclass. It will provide OBS_URI in return which you will prepend
16     # to your files and use it in SRC_URI. Alternatively you can just set
17     # OPENSUSE_RELEASE and OBS_PACKAGE and it will give you back OBS_URI for
18     # downloading files from obs project corresponding to the specified openSUSE
19     # release.
20    
21     # @ECLASS-VARIABLE: OPENSUSE_RELEASE
22     # @DEFAULT_UNSET
23     # @DESCRIPTION:
24 scarabeus 1.3 # From which openSUSE realease to take files.
25     # Eg.: 12.1, 12.2, Factory
26 miska 1.1
27     # @ECLASS-VARIABLE: OBS_PROJECT
28     # @DEFAULT_UNSET
29     # @DESCRIPTION:
30 scarabeus 1.3 # In which obs project pakage is.
31     # This variable does not have to be set, if
32 miska 1.1 # OPENSUSE_RELEASE is provided.
33    
34     # @ECLASS-VARIABLE: OBS_PACKAGE
35     # @DESCRIPTION:
36     # Name of the package we want to take files from.
37 scarabeus 1.3 # By default taken from ${PN}.
38 miska 1.1
39     [[ -z ${OPENSUSE_RELEASE} ]] || OBS_PROJECT="openSUSE:${OPENSUSE_RELEASE}"
40     [[ -n ${OBS_PROJECT} ]] || die "OBS_PROJECT not set!"
41 scarabeus 1.3 [[ -n ${OBS_PACKAGE} ]] || OBS_PACKAGE="${PN}"
42 miska 1.1
43     OBS_URI="https://api.opensuse.org/public/source/${OBS_PROJECT}/${OBS_PACKAGE}"

  ViewVC Help
Powered by ViewVC 1.1.20