1 ################################################################################
3 # bzr.cygclass - functions for building packages from BZR checkouts
5 # Part of cygport - Cygwin packaging application
6 # Copyright (C) 2006-2020 Cygport authors
7 # Provided by the Cygwin project <https://cygwin.com/>
9 # cygport is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # cygport is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with cygport. If not, see <https://www.gnu.org/licenses/>.
22 ################################################################################
24 #****h* Cygclasses/bzr.cygclass
30 # Developed by Canonical Ltd., the company behind Ubuntu Linux,
31 # |html <a href="http://bazaar.canonical.com/">Bazaar</a> is a distributed
32 # version control system which is most commonly used by software hosted on
33 # |html <a href="https://launchpad.net/projects">Launchpad</a>.
35 # This cygclass creates source tarballs from Bazaar checkouts.
37 # This cygclass sets a special SRC_URI for the tarball it creates. If
38 # additional sources are required, be sure to _add_ to SRC_URI rather than
39 # outright setting it.
44 # is this truly needed?
45 BZR_MODULE=${BZR_MODULE:-${ORIG_PN:-${PN}}}
47 bzr_tarball="${BZR_MODULE}-bzr-${PV}.tar.bz2"
49 SRC_URI="${bzr_tarball} "
50 SRC_DIR="${BZR_MODULE}"
57 #****v* bzr.cygclass/BZR_URI
59 # URI of upstream Bazaar repository/branch
61 # This variable is required when inherit()ing bzr.
63 # Software hosted on Launchpad will have a special URI beginning with "lp:";
64 # see `bzr help launchpad' for details.
68 error "BZR_URI must be defined"
71 #****v* bzr.cygclass/BZR_REV
73 # Specific revision to checkout
75 # This variable is optional. If unset, the latest revision for the branch
76 # specified in BZR_URI will be fetched.
78 # See `bzr help revisionspec' for possible forms of revision identifiers.
82 bzr_rev="-r ${BZR_REV}"
85 # T likely doesn't exist at this point, so create it first
88 verbose bzr branch ${BZR_URI} ${BZR_MODULE} ${bzr_rev}
90 tar ${_tar_bz2_flag}cf ${top}/${bzr_tarball} --exclude-vcs ${BZR_MODULE}