- initial import of Apache-Gallery 0.9.1

Apache::Gallery creates an thumbnail index of each directory and allows
viewing pictures in different resolutions. Pictures are resized on the
fly and cached.

from submitter Michael Knudsen thanks
This commit is contained in:
msf 2005-05-27 16:07:43 +00:00
parent 66b1717b38
commit 5ea12ac99e
6 changed files with 250 additions and 0 deletions

View File

@ -0,0 +1,57 @@
# $OpenBSD: Makefile,v 1.1.1.1 2005/05/27 16:07:43 msf Exp $
COMMENT= "mod_perl Apache gallery handler"
DISTNAME= Apache-Gallery-0.9.1
PKGNAME= p5-${DISTNAME}
CATEGORIES= www perl5
MAINTAINER= Michael Knudsen <e@molioner.dk>
HOMEPAGE= http://www.apachegallery.dk/
# Artistic
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= http://apachegallery.dk/download/
RUN_DEPENDS= ::www/p5-URI \
::graphics/p5-Image-Info \
::graphics/p5-Image-Size \
::textproc/p5-Text-Template \
::graphics/p5-Image-Imlib2 \
mod_perl-*::www/mod_perl \
p5-libapreq->=1.0::www/p5-libapreq
BUILD_DEPENDS= ${RUN_DEPENDS}
REGRESS_DEPENDS= ::devel/p5-Test-Pod \
::devel/p5-Test-MockObject
CONFIGURE_STYLE= perl
TEMPLATESDIR= ${PREFIX}/share/Apache-Gallery/templates
ICONSDIR= ${PREFIX}/share/Apache-Gallery/icons
DOCSDIR= ${PREFIX}/share/doc/Apache-Gallery
pre-configure:
@sed -e 's,%%LOCALBASE%%,${LOCALBASE},g;' \
${FILESDIR}/README.chroot > ${WRKSRC}/README.chroot
post-install:
${INSTALL_DATA_DIR} ${TEMPLATESDIR}
.for i in new default
${INSTALL_DATA_DIR} ${TEMPLATESDIR}/${i}
${INSTALL_DATA} ${WRKSRC}/templates/${i}/*.tpl ${TEMPLATESDIR}/${i}
${INSTALL_DATA} ${WRKSRC}/templates/${i}/gallery.css \
${TEMPLATESDIR}/${i}
.endfor
${INSTALL_DATA_DIR} ${ICONSDIR}
${INSTALL_DATA} ${WRKSRC}/htdocs/*.png ${ICONSDIR}
${INSTALL_DATA_DIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/{README,INSTALL} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.chroot ${DOCSDIR}
.include <bsd.port.mk>

View File

@ -0,0 +1,4 @@
MD5 (Apache-Gallery-0.9.1.tar.gz) = 882e650e6fc3f059e84eca1564b5f32f
RMD160 (Apache-Gallery-0.9.1.tar.gz) = 015f9921520c5c3fe382b5e3b7d358b96ddd4be7
SHA1 (Apache-Gallery-0.9.1.tar.gz) = e818c89d2b9a6d1aa63bacf149c4a259e6323284
SIZE (Apache-Gallery-0.9.1.tar.gz) = 82230

View File

@ -0,0 +1,103 @@
# $OpenBSD: README.chroot,v 1.1.1.1 2005/05/27 16:07:43 msf Exp $
In order to make A::G operate in a chrooted environment, it is
necessary to copy all of the relevant libraries and perl modules
that it employs into /var/www.
First, create the basic directory structure:
$ cd /var/www
# mkdir -p tmp usr
# chown www:www tmp (needs to be writeable for the www user)
$ cd /var/www/
# mkdir -p ./%%LOCALBASE%%/lib
$ cd /var/www/usr
# mkdir -p libdata/perl5 libexec {.,X11R6}/lib
Next, the run-time link-editor:
$ cd /var/www/usr/libexec
# cp -p /usr/libexec/ld.so .
Next, the required shared libraries:
$ cd /var/www/usr/lib
# cp -p /usr/lib/lib{c,m,z,perl}.so* .
$ cd /var/www/%%LOCALBASE%%/lib
# cp -p %%LOCALBASE%%/lib/lib{jpeg,png,bz2,tiff,ungif,Imlib2,ltdl}.so* .
# mkdir -p imlib2_loaders/image
# cp -pR %%LOCALBASE%%/lib/imlib2_loaders/image/*.so imlib2_loaders/image
$ cd /var/www/usr/X11R6/lib
# cp -p /usr/X11R6/lib/lib{Xext,freetype,X11}.so.* .
Next, the Perl base:
$ cd /var/www/usr/libdata
# cp -pR /usr/libdata/perl5 .
Next, the A::G images and templates:
$ cd /var/www/%%LOCALBASE%%
# mkdir -p share libdata/perl5/site_perl/`machine`-openbsd
# cp -pR %%LOCALBASE%%/share/Apache-Gallery share
Next, the non-base Perl stuff:
$ cd /var/www/%%LOCALBASE%%/libdata/perl5/site_perl/
# mkdir -p {,`machine`-openbsd/{,auto/}}Apache
# cp -p %%LOCALBASE%%/libdata/perl5/site_perl/Apache/Gallery.pm Apache
# cp -pR %%LOCALBASE%%/libdata/perl5/site_perl/`machine`-openbsd/Apache* \
`machine`-openbsd
# cp -pR %%LOCALBASE%%/libdata/perl5/site_perl/`machine`-openbsd/auto/Apache \
`machine`-openbsd/auto
# mkdir -p {,`machine`-openbsd/}{,auto/}Image
# cp -pR %%LOCALBASE%%/libdata/perl5/site_perl/Image .
# cp -pR %%LOCALBASE%%/libdata/perl5/site_perl/auto/Image/Size auto/Image
# cp -pR %%LOCALBASE%%/libdata/perl5/site_perl/`machine`-openbsd/Image* \
`machine`-openbsd
# cp -pR %%LOCALBASE%%/libdata/perl5/site_perl/`machine`-openbsd/auto/Image \
`machine`-openbsd/auto
# mkdir -p Text URI
# cp -pR %%LOCALBASE%%/libdata/perl5/site_perl/Text/Template* Text
# cp -pR %%LOCALBASE%%/libdata/perl5/site_perl/URI* .
Setting up httpd
------------------------------
<VirtualHost *>
ServerAdmin webmaster@host.some_domain.com
DocumentRoot /var/www/htdocs
ErrorLog logs/gallery-error
CustomLog logs/gallery-access combined
ServerName gallery.site.tld
Alias /icons/gallery/ "%%LOCALBASE%%/share/Apache-Gallery/icons/"
Alias /gallery.css "%%LOCALBASE%%/share/Apache-Gallery/templates/new/gallery.css"
# This is necessary.
Options -Indexes
PerlSetVar GalleryCacheDir '/tmp/'
PerlSetVar GalleryTemplateDir '%%LOCALBASE%%/share/Apache-Gallery/templates/new/'
PerlSetVar GalleryInfo 'Picture Taken => DateTimeOriginal, Flash => Flash'
PerlSetVar GallerySizes '640 1024'
PerlSetVar GalleryThumbnailSize '100x75'
# Note that you will want to change this.
PerlSetVar GalleryCopyrightImage '%%LOCALBASE%%/share/Apache-Gallery/icons/c.png'
<Directory %%LOCALBASE%%/share/Apache-Gallery>
order allow,deny
allow from all
</Directory>
<Location />
SetHandler perl-script
PerlHandler Apache::Gallery
</Location>
</VirtualHost>

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-lib_Apache_Gallery_pm,v 1.1.1.1 2005/05/27 16:07:43 msf Exp $
--- lib/Apache/Gallery.pm.orig Sun May 22 21:39:29 2005
+++ lib/Apache/Gallery.pm Sun May 22 21:39:41 2005
@@ -1711,6 +1711,8 @@ Quality at 50:
Set this option to 1 to convert underscores to spaces in the listing
of directory names.
+=back
+
=head1 FEATURES
=over 4

View File

@ -0,0 +1,3 @@
Apache::Gallery creates an thumbnail index of each directory and allows
viewing pictures in different resolutions. Pictures are resized on the
fly and cached.

View File

@ -0,0 +1,71 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/05/27 16:07:43 msf Exp $
${P5SITE}/Apache/
${P5SITE}/Apache/Gallery.pm
@man man/man3p/Apache::Gallery.3p
share/Apache-Gallery/
share/Apache-Gallery/icons/
share/Apache-Gallery/icons/agfolder.png
share/Apache-Gallery/icons/application-doc.png
share/Apache-Gallery/icons/application-pdf.png
share/Apache-Gallery/icons/application-rtf.png
share/Apache-Gallery/icons/c.png
share/Apache-Gallery/icons/sound-mp3.png
share/Apache-Gallery/icons/sound-ogg.png
share/Apache-Gallery/icons/sound-wav.png
share/Apache-Gallery/icons/video-asf.png
share/Apache-Gallery/icons/video-avi.png
share/Apache-Gallery/icons/video-mov.png
share/Apache-Gallery/icons/video-mpeg.png
share/Apache-Gallery/icons/video-mpg.png
share/Apache-Gallery/icons/video-wmv.png
share/Apache-Gallery/templates/
share/Apache-Gallery/templates/default/
share/Apache-Gallery/templates/default/dircomment.tpl
share/Apache-Gallery/templates/default/directory.tpl
share/Apache-Gallery/templates/default/error.tpl
share/Apache-Gallery/templates/default/file.tpl
share/Apache-Gallery/templates/default/gallery.css
share/Apache-Gallery/templates/default/index.tpl
share/Apache-Gallery/templates/default/info.tpl
share/Apache-Gallery/templates/default/interval.tpl
share/Apache-Gallery/templates/default/intervalactive.tpl
share/Apache-Gallery/templates/default/layout.tpl
share/Apache-Gallery/templates/default/navpicture.tpl
share/Apache-Gallery/templates/default/nodircomment.tpl
share/Apache-Gallery/templates/default/nopictureinfo.tpl
share/Apache-Gallery/templates/default/orig.tpl
share/Apache-Gallery/templates/default/picture.tpl
share/Apache-Gallery/templates/default/pictureinfo.tpl
share/Apache-Gallery/templates/default/refresh.tpl
share/Apache-Gallery/templates/default/scale.tpl
share/Apache-Gallery/templates/default/scaleactive.tpl
share/Apache-Gallery/templates/default/showpicture.tpl
share/Apache-Gallery/templates/default/slideshowisoff.tpl
share/Apache-Gallery/templates/default/slideshowoff.tpl
share/Apache-Gallery/templates/new/
share/Apache-Gallery/templates/new/dircomment.tpl
share/Apache-Gallery/templates/new/directory.tpl
share/Apache-Gallery/templates/new/error.tpl
share/Apache-Gallery/templates/new/file.tpl
share/Apache-Gallery/templates/new/gallery.css
share/Apache-Gallery/templates/new/index.tpl
share/Apache-Gallery/templates/new/info.tpl
share/Apache-Gallery/templates/new/interval.tpl
share/Apache-Gallery/templates/new/intervalactive.tpl
share/Apache-Gallery/templates/new/layout.tpl
share/Apache-Gallery/templates/new/navpicture.tpl
share/Apache-Gallery/templates/new/nodircomment.tpl
share/Apache-Gallery/templates/new/nopictureinfo.tpl
share/Apache-Gallery/templates/new/orig.tpl
share/Apache-Gallery/templates/new/picture.tpl
share/Apache-Gallery/templates/new/pictureinfo.tpl
share/Apache-Gallery/templates/new/refresh.tpl
share/Apache-Gallery/templates/new/scale.tpl
share/Apache-Gallery/templates/new/scaleactive.tpl
share/Apache-Gallery/templates/new/showpicture.tpl
share/Apache-Gallery/templates/new/slideshowisoff.tpl
share/Apache-Gallery/templates/new/slideshowoff.tpl
share/doc/Apache-Gallery/
share/doc/Apache-Gallery/INSTALL
share/doc/Apache-Gallery/README
share/doc/Apache-Gallery/README.chroot