| 1 | # $Id$ |
|---|
| 2 | NAME = lighttpd |
|---|
| 3 | VERSION = 1.4.30 |
|---|
| 4 | CATEGORIES = server |
|---|
| 5 | GARTYPE = v2 |
|---|
| 6 | |
|---|
| 7 | DESCRIPTION = HTTP server built for security, speed, compliance, and flexibility |
|---|
| 8 | define BLURB |
|---|
| 9 | Security, speed, compliance, and flexibility -- all of these describe lighttpd |
|---|
| 10 | (pron. lighty) which is rapidly redefining efficiency of a webserver; as it is |
|---|
| 11 | designed and optimized for high performance environments. With a small memory |
|---|
| 12 | footprint compared to other web-servers, effective management of the cpu-load, |
|---|
| 13 | and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, |
|---|
| 14 | URL-Rewriting and many more) lighttpd is the perfect solution for every server |
|---|
| 15 | that is suffering load problems. And best of all it's Open Source licensed |
|---|
| 16 | under the revised BSD license. |
|---|
| 17 | endef |
|---|
| 18 | |
|---|
| 19 | MASTER_SITES = http://download.lighttpd.net/lighttpd/releases-1.4.x/ |
|---|
| 20 | DISTFILES += $(NAME)-$(VERSION).tar.gz |
|---|
| 21 | DISTFILES += cswlighttpd |
|---|
| 22 | |
|---|
| 23 | PATCHFILES += 0001-Work-around-linking-problem-buffer.c.patch |
|---|
| 24 | |
|---|
| 25 | # When mkdir is issued on an automounted directory like /home/<someuser> errno is |
|---|
| 26 | # set to ENOSYS halting recursive directory generation. This patches handles |
|---|
| 27 | # ENOSYS similar to EEXIST and just continues with the creation which then may |
|---|
| 28 | # or may not work later on. |
|---|
| 29 | # |
|---|
| 30 | # There's a thread started on lighttpd forums about the issue: |
|---|
| 31 | # http://redmine.lighttpd.net/boards/2/topics/4163 |
|---|
| 32 | PATCHFILES += 0003-Ignore-ENOSYS-on-mkdir-which-happens-on-automounted-.patch |
|---|
| 33 | |
|---|
| 34 | PACKAGING_PLATFORMS = solaris9-sparc solaris9-i386 |
|---|
| 35 | PACKAGING_PLATFORMS += solaris10-sparc solaris10-i386 |
|---|
| 36 | |
|---|
| 37 | PACKAGES += CSWlighttpd |
|---|
| 38 | CATALOGNAME_CSWlighttpd = lighttpd |
|---|
| 39 | SPKG_DESC_CSWlighttpd = HTTP server built for security, speed, compliance, and flexibility |
|---|
| 40 | RUNTIME_DEP_PKGS_CSWlighttpd += CSWlibbz2-1-0 |
|---|
| 41 | RUNTIME_DEP_PKGS_CSWlighttpd += CSWlibpcre1 |
|---|
| 42 | RUNTIME_DEP_PKGS_CSWlighttpd += CSWlibssl0-9-8 |
|---|
| 43 | RUNTIME_DEP_PKGS_CSWlighttpd += CSWlibz1 |
|---|
| 44 | |
|---|
| 45 | EXTRA_LINKER_FLAGS += -lsendfile |
|---|
| 46 | |
|---|
| 47 | # To fix undefined symbol 'dlopen' on Solaris 9 |
|---|
| 48 | EXTRA_LINKER_FLAGS_5.9 += -ldl |
|---|
| 49 | EXTRA_LINKER_FLAGS += $(EXTRA_LINKER_FLAGS_$(GAROSREL)) |
|---|
| 50 | |
|---|
| 51 | # lighttpd puts its modules under libdir, so we pass libdir as a subdirectory, |
|---|
| 52 | # because modules are not supposed to be in /opt/csw/lib. |
|---|
| 53 | libdir_install = $(prefix)/lib/lighttpd |
|---|
| 54 | |
|---|
| 55 | CONFIGURE_ARGS = $(DIRPATHS) |
|---|
| 56 | |
|---|
| 57 | CONFIGURE_ARGS += --with-openssl=$(prefix) |
|---|
| 58 | EXTRA_LINKER_FLAGS += -lcrypto |
|---|
| 59 | |
|---|
| 60 | # Solaris 9 does not have IPV6_V6ONLY. |
|---|
| 61 | # IPv6 support only works on Solaris 10. |
|---|
| 62 | CONFIGURE_ARGS_5.9 = --disable-ipv6 |
|---|
| 63 | CONFIGURE_ARGS += $(CONFIGURE_ARGS_$(GAROSREL)) |
|---|
| 64 | |
|---|
| 65 | INITSMF = $(sysconfdir)/init\.d/cswlighttpd |
|---|
| 66 | PRESERVECONF = $(sysconfdir)/lighttpd\.conf |
|---|
| 67 | USERGROUP = $(sysconfdir)/pkg/$(NAME)/cswusergroup |
|---|
| 68 | |
|---|
| 69 | # Migrating the configuration file from /opt/csw/etc to /etc/opt/csw |
|---|
| 70 | MIGRATE_FILES = lighttpd.conf |
|---|
| 71 | |
|---|
| 72 | # To allow lighttpd to write logs |
|---|
| 73 | PROTOTYPE_MODIFIERS = user |
|---|
| 74 | PROTOTYPE_FILES_user = $(localstatedir)/log/lighttpd |
|---|
| 75 | PROTOTYPE_USER_user = lighttpd |
|---|
| 76 | PROTOTYPE_GROUP_user = lighttpd |
|---|
| 77 | PROTOTYPE_CLASS_user = ugfiles |
|---|
| 78 | |
|---|
| 79 | BUILD64 = 1 |
|---|
| 80 | ISAEXEC = 1 |
|---|
| 81 | |
|---|
| 82 | include gar/category.mk |
|---|
| 83 | |
|---|
| 84 | post-install-modulated: |
|---|
| 85 | ginstall -d -m 755 $(DESTDIR)$(sysconfdir)/init.d |
|---|
| 86 | ginstall -m 755 $(DOWNLOADDIR)/cswlighttpd $(DESTDIR)$(sysconfdir)/init.d |
|---|
| 87 | # ginstall -m 644 $(WORKSRC)/doc/config/lighttpd.conf $(DESTDIR)$(sysconfdir) |
|---|
| 88 | # gsed -i -e 's+/usr/local+/opt/csw+g' $(DESTDIR)$(sysconfdir)/lighttpd.conf |
|---|
| 89 | ginstall -m 644 $(FILEDIR)/lighttpd.conf $(DESTDIR)$(sysconfdir) |
|---|
| 90 | gsed -i -e 's+/usr/local+/opt/csw+g' $(DESTDIR)$(sysconfdir)/lighttpd.conf |
|---|
| 91 | ginstall -d -m 755 $(DESTDIR)$(localstatedir)/run |
|---|
| 92 | ginstall -d -m 755 $(DESTDIR)$(datadir)/lighttpd-root |
|---|
| 93 | echo 'lighttpd is working!' > $(DESTDIR)$(datadir)/lighttpd-root/index.html |
|---|
| 94 | ginstall -d -m 755 $(DESTDIR)$(localstatedir)/log/lighttpd |
|---|
| 95 | ginstall -d -m 755 $(DESTDIR)$(sysconfdir)/pkg/$(NAME) |
|---|
| 96 | echo "lighttpd:lighttpd:lighttpd web server::::" \ |
|---|
| 97 | > $(DESTDIR)$(sysconfdir)/pkg/$(NAME)/cswusergroup |
|---|
| 98 | (cd $(DESTDIR)$(libdir_install); ln -s $(ISA_DEFAULT) 32) |
|---|
| 99 | (cd $(DESTDIR)$(libdir_install); ln -s $(ISA_DEFAULT64) 64) |
|---|
| 100 | @$(MAKECOOKIE) |
|---|