This is my first shot at writing an ebuild. Its broken and doesn't work but I think it is in the right direction. I'm looking for feedback and perhaps a way to make this work. :P Reproducible: Always Steps to Reproduce:
Created attachment 31394 [details] gallery-1.4.3-pl1 ebuild
app-misc/gallery works your ebuild already has webapp.eclass, which the old one has to be converted to
app-misc/gallery only goes up to 1.4.3 and uses ${HTTPD_ROOT} which I thought needed to be replaced using ${MY_HTROOTDIR} and ${MY_HTDOCSDIR} to be fully compatabile with webapp-config. I also couldnt see a reason for gallery to inherit webapp-apache instead of just webapp, but I don't really know what I am doing yet.
i get a big sandbox error, access violation did you try it with sandbox enabled ?
I don't think this ebuild works at all. I couldn't get it to run on my machine and I don't know what is wrong with it.
Should this be assinged to webapps-request@gentoo.org? Currently gallery ebuild is useless to me as it installs to /var/www/localhost and I use a vhost somewhere else.
Hiya, Here's some review comments on your ebuild to get you started. a) There's no real need for the pkg_setup() function. It doesn't break anything, just superfluous. b) If your ebuild doesn't compile anything, better to add a src_compile() function which does nothing. That way, you're not relying on any default behaviour of portage (which may or may not change in the future). c) You're trying to call a number of functions which don't exist. The easiest thing to do is to take an ebuild that works (such as phpmyadmin, as a good example) and read that to see how it works. Best regards, Stu
Created attachment 34873 [details] gallery-1.4.3_p2.ebuild
Sorry for the delay, I was at Apple's WWDC and had a lot to catch up on when I got back. So here's my second go at it. It seems a lot like phpmyadmin except unpack for phpmyadmin results in /phpmyadmin-$PV/ whereas unpacking gallery results in /gallery/ so i set S to $WORKDIR/$PN instead of $MY_P. When trying the ebuild I get: /usr/sbin/ebuild.sh: line 46: /usr/share/webapps/gallery/1.4.3_p2/htdocs/.htaccess: No such file or directory * ebuild fault: file '/usr/share/webapps/gallery/1.4.3_p2/htdocs/.htaccess' not found Should I be touching and marking the config files that aren't included in the tar in pkg_postinst perhaps?
If the file doesn't exist, why are you wanting portage to fake it? This is so it will be cleaned up if the app is unmerged? If thats the case, I'd suggest you don't bother. As you say, its a config file, and those would normally be left behind if they've been touched anyway. So, forget about the .htaccess file imho.
Problem is, its part of the install process for Gallery. http://gallery.menalto.com/modules.php?op=modload&name=GalleryDocs&file=index&page=gallery1-install.unix-shell.php "2. Create two blank files, .htaccess and config.php. The easiest way is to use the configure.sh script. sh configure.sh" In Gallery 1.4.4 (due out next week or so) we no longer use the configure.sh and secure.sh but the files still need to be created before the Configuration Wizard will do its thing. This is so the files can be created in a directory that the webserver doesn't have write access to if i remember right. (just to those specific files).
gallery 2.0 alpha1 is out. it would be interesting to have an ebuild for it.
Gallery 2 is a completly re-written product. I'll see about writing an ebuild for it once this one is working, though if you really want it filing another bug report is probably the way to go.
Ebuild from bug #58375 is in CVS.