tech-pkg archive

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

Re: Recommended way to track upstream version in Makefile



Thomas Klausner <wiz%gatalith.at@localhost> writes:

> That's one way, but usually I do something like
>
> DISTNAME=       gotosocial-${CODEBERG_TAG}-source-code
> PKGNAME=	${DISTNAME:S/-source-code//}
>
> and then use ${PKGVERSION_NOREV} where you would use ${CODEBERG_TAG}.


I lean to setting VERSION and then using it in multiple places.   In
the end it's basically equivalent, and depends on what people find
easier to read.   I suspect I prefer VERSION and using it to what is
basically a sed pattern in a make variable because I have never fully
absorbed make variables -- but it's easy to read and easy to copy
examples.

The important thing in my view is that the version number should be
present only once in the makefile.  Two ways are ok in my opinion

  - trailing number in DISTNAME, as foo-1.2.3
    This is the normal approach for upstreams with traditional
    distfiles, back when distfiles were intentionally distributed,
    rather than accepting whatever broken names github gives you.

  - a VERSION= variable before  the DISTNAME/PKGNAME block

The point is that the human going to update should be able to find the
version number within a second or two of opening the file.



  




Home | Main Index | Thread Index | Old Index