tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

GITHUB_PROJECT assignment



Hi folks,

Imagine we would package the foo program hosted by the jsmith github account. Unfortunately, the repository is named foo-dev. I would to write:
DISTNAME=       foo-dev-1.2.3
PKGNAME=        ${DISTNAME:S/-dev//}
MASTER_SITES=   ${MASTER_SITE_GITHUB:=jsmith/}

But it doesn't work because GITHUB_PROJECT?= ${PKGBASE}:
Requesting https://github.com/jsmith/foo/archive/1.2.3.tar.gz
ftp: Error retrieving file `404 Not Found'

If I write the followings:
DISTNAME=       foo-1.2.3
MASTER_SITES=   ${MASTER_SITE_GITHUB:=jsmith/}
GITHUB_PROJECT= ${PKGBASE}-dev
It doesn't work because WRKSRC?= ${WRKDIR}/${DISTNAME:U${PKGNAME_NOREV}}. WRKSRC=work/foo-1.2.3 but actually, the extraction of archive produces work/foo-dev-1.2.3: patch: **** can't cd to /usr/pkgsrc/xxx/foo/work/foo-1.2.3: No such file or directory

A working solution is:
DISTNAME=       foo-dev-1.2.3
PKGNAME=        ${DISTNAME:S/-dev//}
MASTER_SITES=   ${MASTER_SITE_GITHUB:=jsmith/}
GITHUB_PROJECT= ${PKGBASE}-dev

What about the following solution?
+++ fetch/github.mk     2018-05-24 12:56:25.000000000 +0200
@@ -39,7 +39,7 @@

 .if defined(_USE_GITHUB) && !empty(_USE_GITHUB:M[yY][eE][sS])

-GITHUB_PROJECT?=       ${PKGBASE}
+GITHUB_PROJECT?=       ${DISTNAME:C/-[^-]*$//}
 GITHUB_TAG?=           ${PKGVERSION_NOREV}

 .  if !empty(GITHUB_TAG:Mmaster)

--
Frédéric FAUBERTEAU
Enseignant-Chercheur
Responsable Département Nouvelles Énergies ESILV

Pôle Universitaire Léonard de Vinci
ESILV - Bureau L506
92916 Paris La Défense cedex
http://www.esilv.fr
Tél : +33 1 41 16 74 53


Home | Main Index | Thread Index | Old Index