1 ################################################################################
3 # cvs.cygclass - functions for building packages from CVS 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/cvs.cygclass
32 # CVS is a centralized version control system. It was the first widely-used
33 # VCS for open-source software, but many projects have since moved to Subversion
34 # or one of the distributed VCSs.
36 # This cygclass creates source tarballs from CVS checkouts.
38 # This cygclass sets a special SRC_URI for the tarball it creates. If
39 # additional sources are required, be sure to _add_ to SRC_URI rather than
40 # outright setting it.
45 CVS_MODULE=${CVS_MODULE:-${ORIG_PN:-${PN}}}
47 cvs_tarball="${CVS_MODULE//\//-}-${PV}.tar.bz2"
49 SRC_URI="${cvs_tarball} "
50 SRC_DIR=${SRC_DIR:-${CVS_MODULE}}
58 #****v* cvs.cygclass/CVS_URI
60 # Address of CVS repository ("Root" in CVS parlance), usually in the form:
61 # :pserver:anonymous@<server_uri>:/remote/path/to/repository
65 error "CVS_URI must be defined"
68 #****v* cvs.cygclass/CVS_BRANCH
70 # Specific revision or tag to checkout.
74 cvs_branch="-r ${CVS_BRANCH}"
77 #****v* cvs.cygclass/CVS_DATE
79 # Specific revision date to checkout. Preferred form is YYYY-MM-DD [HH:MM],
80 # where the time is optional; the hyphens in the date can be omitted.
82 # If a date is specified without a time, then the time 00:00 is implied,
83 # which will exclude all revisions made on the given date. Use the
84 # following day in CVS_DATE instead.
88 cvs_date="-D ${CVS_DATE}"
91 #****v* cvs.cygclass/CVS_MODULE
93 # Name of the CVS module to check out. The default value is ORIG_PN if
94 # defined, or PN if not.
96 # In the rare case that the top-level directory of the checkout does not
97 # match the value of CVS_MODULE, then define SRC_DIR accordingly.
99 # T likely doesn't exist at this point, so create it first
102 verbose cvs -d ${CVS_URI} checkout ${cvs_branch} ${cvs_date} ${CVS_MODULE}
104 tar ${_tar_bz2_flag}cf ${top}/${cvs_tarball} --exclude-vcs ${SRC_DIR}
107 readonly -f cvs_fetch