[pacman-dev] code reuse for PKGBUILD

Allan McRae allan at archlinux.org
Tue Dec 11 08:47:53 EST 2012

On 08/12/12 03:17, Florian Pritz wrote:
> You could go with something like:
> # template start: name=perl-module; sha1=feedbeef42c0ffee; version=1.2.3
> code
> code
> # template end

On 07/12/12 13:46, Kent Fredric wrote:> 3. #<<NAMEHERE>> is replaced
with #<<NAMEHERE:sha=$sha1:v=$version>>  (
> where $sha1 is the sha1 of the content that was inlined, and $version is
> the version of the module that was used to generate the body.
> 4. generated content is injected after modified #<<NAMEHERE>>
> 5. closing #<<-NAMEHERE>>  comment is added.

I'm going to give this idea the OK to go into makepkg...

However it would be good to come to some agreement on the syntax first.
In particular, I'd like to see the syntax and the sed/awk line that
would be used to replace it on first use and update it subsequently.
Remember that there could be nesting.  Once that is demonstrated and the
final format chosen, then it can be implemented.

I am picky about this because we do not like breaking PKGBUILD formats
in the future and I do not want this to become the maintenance nightmare
that it could end up being if done wrong.

More information about the pacman-dev mailing list