New formula: cgit


(Franklin Yu) #1

I would like to package cgit, but I have several questions about it.

  1. It builds CGI binaries. Are CGI binaries welcomed in Homebrew Core?
  2. Where should I put the CGI binary? The project puts it in /var/www/htdocs/cgit/. Shall I place it in $HOMEBREW_PREFIX/var/www/htdocs/cgit/?
  3. How do I test the CGI binary? Do I manually specify all the CGI variables, or is there some related built-in?

(Mike McQuaid) #2

Yep!

Ideally somewhere easy to serve from an HTTP server. Maybe just #{pkgshare}.

There’s no built-in I’m afraid.

Open a PR and ilovezfs will help you with the rest I’m sure.


(Franklin Yu) #3

It also allows specify several other paths:

  1. CGIT_DATA_PATH: I assume that files in this path would be mutated by the CGI binary. Defaults to the same directory of CGI binary, but I think it may be better not to mutate things in pkgshare.
  2. CGIT_CONFIG: the config file, defaults to /etc/cgitrc. Maybe make it etc/'cgitrc'?
  3. CACHE_ROOT: cache folder. Defaults to /var/cache/cgit/. Keep it #{var}/cache/cgit/?

(Mike McQuaid) #4
  1. var somewhere
  2. agreed
  3. agreed