Implement building packages from bzr/git/hg/svn/etc

Registered by ojab

Currently xbps-src can use only tarballs. It'll be great to fetch sources directly from repositories.

Blueprint information

Status:
Complete
Approver:
Juan RP
Priority:
Low
Drafter:
None
Direction:
Needs approval
Assignee:
Juan RP
Definition:
Approved
Series goal:
Accepted for head
Implementation:
Implemented
Milestone target:
milestone icon 0.2
Started by
Juan RP
Completed by
Juan RP

Related branches

Sprints

Whiteboard

I added code to fetch sources in ${XBPS_BUILDDIR} with your custom command. This is how it works:

In a build template "templates/foo/template" you remove $distfiles and $checksum.
The "nofetch" and "noextract" variables must be set and a function must be used to fetch
the sources, like:

do_fetch()
{
  echo "Fetching sources via git repository..."
  git clone git://foo.or.cz/blah.git"
}

For example to make a build template for XBPS that fetches the sources from bzr latest
code is the following:

---- templates/xbps-snapshot-bzr ---

pkgname=xbps-snapshot-bzr
build_style=gnu_makefile
version="$(date +%F)"
make_install_target="..."
short_desc="..."
long_desc="..."

nofetch=yes
noextract=yes
conf_files="..."

Add_dependency ...

do_fetch()
{
    msg_normal "Fetching HEAD bzr branch from launchpad..."
    bzr branch lp:xbps ${pkgname}-${ersion}
}

-------

Also don't forget that you can do everything you need if you use "build_style=custom-install".
fetch, configure, build and install is all handled in the "do_install()" function.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.