| 1 |
version=4 |
| 2 |
# searchmode: use searchmode plain to search in the JSON returned by the API |
| 3 |
# filenamemangle: extract from the URL the GitHub project name (the last path part before /tarball/) and the version, |
| 4 |
# to generate a resulting tarball named: ${PROJECT_NAME}-${VERSION}.tar.gz |
| 5 |
# pgpsigurlmangle: retrieve also the tarball PGP signature assuming it was uploaded with name ${PROJECT_NAME}-v${VERSION} |
| 6 |
# extracting from the tarball download URL the GitHub username/organization, the GitHub project name and |
| 7 |
# the version generating the signature URL as required by GitHub |
| 8 |
# URL: use the project API URL to get the release information, looking for the tarball URL and extracting the version from |
| 9 |
# the last part of the URL path. |
| 10 |
# We have to un-break some upstream version numbers, and transfrom .rc to ~rc |
| 11 |
opts=searchmode=plain,\ |
| 12 |
uversionmangle=s/v(\d\.\d+)/$1/;s/\.rc/~rc/,\ |
| 13 |
filenamemangle=s~.+/([^/]+)/tarball/v(@ANY_VERSION@)~$1-$2.tar.gz~,\ |
| 14 |
pgpsigurlmangle=s~api.github.com/repos/([^/]+)/([^/]+)/tarball/v(@ANY_VERSION@)~github.com/$1/$2/releases/download/v$3/$2-$3.tar.gz.asc~ \ |
| 15 |
https://api.github.com/repos/libcgroup/libcgroup/releases https://api\.github\.com/repos/[^/]+/[^/]+/tarball/v([^"]+) |