| 1 | ##################################################################### |
|---|
| 2 | # OpenCSW build recipe for vsftpd |
|---|
| 3 | # |
|---|
| 4 | # Copyright 2009 Yann Rouillard <yann@pleiades.fr.eu.org> |
|---|
| 5 | # All rights reserved. Use is subject to license terms. |
|---|
| 6 | # |
|---|
| 7 | # Redistribution and/or use, with or without modification, is |
|---|
| 8 | # permitted. This software is without warranty of any kind. The |
|---|
| 9 | # author(s) shall not be liable in the event that use of the |
|---|
| 10 | # software causes damage. |
|---|
| 11 | ##################################################################### |
|---|
| 12 | |
|---|
| 13 | ###### Package information ####### |
|---|
| 14 | |
|---|
| 15 | NAME = vsftpd |
|---|
| 16 | VERSION = 3.0.0 |
|---|
| 17 | CATEGORIES = server |
|---|
| 18 | GARTYPE = v2 |
|---|
| 19 | |
|---|
| 20 | DESCRIPTION = A very secure and fast FTP server. |
|---|
| 21 | define BLURB |
|---|
| 22 | vsftpd is a secure and fast FTP server for UNIX-like systems |
|---|
| 23 | that is used on many large and critical Internet sites. |
|---|
| 24 | Its rich feature set includes SSL encryption, IPv6, bandwidth |
|---|
| 25 | throttling, PAM integration, virtual users, virtual IPs and |
|---|
| 26 | per-user / per-IP configuration. |
|---|
| 27 | endef |
|---|
| 28 | |
|---|
| 29 | MASTER_SITES = https://security.appspot.com/downloads/ |
|---|
| 30 | UPSTREAM_MASTER_SITES = https://security.appspot.com/vsftpd.html |
|---|
| 31 | |
|---|
| 32 | PACKAGES = CSWvsftpd |
|---|
| 33 | |
|---|
| 34 | RUNTIME_DEP_PKGS = CSWlibwrap1 |
|---|
| 35 | RUNTIME_DEP_PKGS += CSWlibssl1-0-0 |
|---|
| 36 | |
|---|
| 37 | # Reference to DTD path, can be safely ignored |
|---|
| 38 | CHECKPKG_OVERRIDES_CSWvsftpd += file-with-bad-content|/usr/share|root/var/opt/csw/svc/manifest/network/cswvsftpd.xml |
|---|
| 39 | |
|---|
| 40 | # Various reference to default vsftpd path in documentation files, can be safely ignored |
|---|
| 41 | CHECKPKG_OVERRIDES_CSWvsftpd += file-with-bad-content|/usr/local|root/opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/vsftpd.xinetd |
|---|
| 42 | CHECKPKG_OVERRIDES_CSWvsftpd += file-with-bad-content|/usr/local|root/opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/README |
|---|
| 43 | CHECKPKG_OVERRIDES_CSWvsftpd += file-with-bad-content|/usr/local|root/opt/csw/share/doc/vsftpd/INSTALL |
|---|
| 44 | CHECKPKG_OVERRIDES_CSWvsftpd += file-with-bad-content|/usr/local|root/opt/csw/share/doc/vsftpd/Changelog |
|---|
| 45 | CHECKPKG_OVERRIDES_CSWvsftpd += file-with-bad-content|/usr/share|root/opt/csw/share/doc/vsftpd/INSTALL |
|---|
| 46 | CHECKPKG_OVERRIDES_CSWvsftpd += file-with-bad-content|/usr/share|root/opt/csw/share/doc/vsftpd/README.ssl |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | ###### Upstream and opencsw files information ####### |
|---|
| 50 | |
|---|
| 51 | DISTFILES = $(NAME)-$(VERSION).tar.gz |
|---|
| 52 | DISTFILES += CSWvsftpd.preinstall |
|---|
| 53 | DISTFILES += changelog.CSW README.CSW |
|---|
| 54 | DISTFILES += vsftpd.conf vsftpd.userlist |
|---|
| 55 | DISTFILES += cswvsftpd cswvsftpd.xml vsftpd.smf_wrapper |
|---|
| 56 | DISTFILES += cswusergroup |
|---|
| 57 | |
|---|
| 58 | PRESERVECONF = $(sysconfdir)/vsftpd/vsftpd.conf $(sysconfdir)/vsftpd/vsftpd.userlist |
|---|
| 59 | USERGROUP = /etc/opt/csw/pkg/CSWvsftpd/cswusergroup |
|---|
| 60 | INITSMF = /etc/opt/csw/init.d/cswvsftpd |
|---|
| 61 | |
|---|
| 62 | MIGRATE_FILES = vsftpd.conf vsftpd.chroot_list vsftpd.banned_emails vsftpd.email_passwords vsftpd.user_list |
|---|
| 63 | MIGRATE_SOURCE_DIR = $(prefix)/etc/vsftpd |
|---|
| 64 | MIGRATE_DEST_DIR = $(sysconfdir)/vsftpd |
|---|
| 65 | |
|---|
| 66 | # The vsftpd user home directory has special rights |
|---|
| 67 | PROTOTYPE_MODIFIERS = empty |
|---|
| 68 | PROTOTYPE_FILES_empty = \/opt\/csw\/var\/empty\/vsftpd |
|---|
| 69 | PROTOTYPE_PERMS_empty = 0700 |
|---|
| 70 | PROTOTYPE_USER_empty = root |
|---|
| 71 | PROTOTYPE_GROUP_empty = sys |
|---|
| 72 | |
|---|
| 73 | # build options are set by modifying |
|---|
| 74 | # builddefs.h, so we patch it to enable |
|---|
| 75 | # ssl and tcp wrapper support |
|---|
| 76 | PATCHFILES = build_options.patch |
|---|
| 77 | |
|---|
| 78 | # patch to have vsftpd use standard |
|---|
| 79 | # csw paths |
|---|
| 80 | PATCHFILES += csw_paths.patch |
|---|
| 81 | |
|---|
| 82 | # patch to integrate vsftpd Makefile |
|---|
| 83 | # with csw build system |
|---|
| 84 | PATCHFILES += csw_build_system.patch |
|---|
| 85 | |
|---|
| 86 | # Use vsftpd instead of nobody as the |
|---|
| 87 | # privilege separation user |
|---|
| 88 | PATCHFILES += set_priv_sep_user.patch |
|---|
| 89 | |
|---|
| 90 | # patch to add DESTDIR support to |
|---|
| 91 | # vsftpd makfile |
|---|
| 92 | PATCHFILES += destdir.patch |
|---|
| 93 | |
|---|
| 94 | # patch to avoid an incompatible pointer type |
|---|
| 95 | # error when compiling under Solaris with -Werror |
|---|
| 96 | PATCHFILES += avoid_pam_conv_warning.patch |
|---|
| 97 | |
|---|
| 98 | # Documentation files |
|---|
| 99 | DOCFILES = AUDIT BENCHMARKS BUGS COPYING COPYRIGHT Changelog FAQ INSTALL LICENSE REFS |
|---|
| 100 | DOCFILES += REWARD SIZE SPEED TODO TUNING README README.ssl README.security |
|---|
| 101 | DOCFILES += SECURITY/DESIGN SECURITY/IMPLEMENTATION SECURITY/OVERVIEW SECURITY/TRUST |
|---|
| 102 | DOCFILES += EXAMPLE/VIRTUAL_USERS_2/README EXAMPLE/PER_IP_CONFIG/README EXAMPLE/PER_IP_CONFIG/hosts.allow |
|---|
| 103 | DOCFILES += EXAMPLE/VIRTUAL_HOSTS/README EXAMPLE/VIRTUAL_USERS/logins.txt EXAMPLE/VIRTUAL_USERS/vsftpd.pam |
|---|
| 104 | DOCFILES += EXAMPLE/VIRTUAL_USERS/vsftpd.conf EXAMPLE/INTERNET_SITE/vsftpd.xinetd |
|---|
| 105 | DOCFILES += EXAMPLE/INTERNET_SITE/README EXAMPLE/INTERNET_SITE/vsftpd.conf |
|---|
| 106 | DOCFILES += EXAMPLE/INTERNET_SITE_NOINETD/README EXAMPLE/INTERNET_SITE_NOINETD/vsftpd.conf |
|---|
| 107 | |
|---|
| 108 | |
|---|
| 109 | ##### Build and installation information ##### |
|---|
| 110 | |
|---|
| 111 | GARCOMPILER = SUN |
|---|
| 112 | |
|---|
| 113 | CONFIGURE_ARGS = $(DIRPATHS) |
|---|
| 114 | |
|---|
| 115 | CONFIGURE_SCRIPTS = |
|---|
| 116 | TEST_SCRIPTS = |
|---|
| 117 | |
|---|
| 118 | include gar/category.mk |
|---|
| 119 | |
|---|
| 120 | # to support shared /opt/csw setup |
|---|
| 121 | # see http://wiki.opencsw.org/shared-opt-csw-setup |
|---|
| 122 | localstatedir = /var$(prefix) |
|---|
| 123 | sysconfdir = /etc$(prefix) |
|---|
| 124 | |
|---|
| 125 | # /opt/csw/include is not take in account |
|---|
| 126 | # by vsftp build system |
|---|
| 127 | CFLAGS += -I$(includedir) |
|---|
| 128 | |
|---|
| 129 | # dummyinc must be the last include directory |
|---|
| 130 | # to search |
|---|
| 131 | ifeq ($(GARCOMPILER),GNU) |
|---|
| 132 | CFLAGS += -idirafter dummyinc |
|---|
| 133 | else |
|---|
| 134 | CFLAGS += -I/usr/include -Idummyinc |
|---|
| 135 | endif |
|---|
| 136 | |
|---|
| 137 | INSTALL_ENV += INSTALL="ginstall" |
|---|
| 138 | |
|---|
| 139 | |
|---|
| 140 | # we create the csw directory hierarchy |
|---|
| 141 | pre-install-modulated: |
|---|
| 142 | @echo "Creating csw directories" |
|---|
| 143 | ( ginstall -d $(DESTDIR)$(sbindir); \ |
|---|
| 144 | ginstall -d $(DESTDIR)$(mandir)/man5; \ |
|---|
| 145 | ginstall -d $(DESTDIR)$(mandir)/man8; \ |
|---|
| 146 | ginstall -d $(DESTDIR)$(docdir)/vsftpd ) |
|---|
| 147 | |
|---|
| 148 | |
|---|
| 149 | post-merge: merge-doc-files merge-config-files merge-init-file merge-special-directories |
|---|
| 150 | |
|---|
| 151 | merge-init-file: |
|---|
| 152 | ginstall -D "$(WORKDIR_FIRSTMOD)/cswvsftpd" "$(PKGROOT)/etc/opt/csw/init.d/cswvsftpd" |
|---|
| 153 | ginstall -D "$(WORKDIR_FIRSTMOD)/cswvsftpd.xml" "$(PKGROOT)/var/opt/csw/svc/manifest/network/cswvsftpd.xml" |
|---|
| 154 | ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.smf_wrapper" "$(PKGROOT)/$(sbindir)/vsftpd.smf_wrapper" |
|---|
| 155 | |
|---|
| 156 | merge-config-files: |
|---|
| 157 | ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.conf" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.conf.CSW" |
|---|
| 158 | ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.userlist" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.userlist.CSW" |
|---|
| 159 | ginstall -D "$(WORKDIR_FIRSTMOD)/cswusergroup" "$(PKGROOT)$(sysconfdir)/pkg/CSWvsftpd/cswusergroup" |
|---|
| 160 | |
|---|
| 161 | merge-doc-files: |
|---|
| 162 | for FILE in $(DOCFILES); do \ |
|---|
| 163 | ginstall -D "$(WORKSRC_FIRSTMOD)/$$FILE" "$(PKGROOT)$(docdir)/vsftpd/$$FILE"; \ |
|---|
| 164 | done |
|---|
| 165 | ginstall -D "$(WORKDIR_FIRSTMOD)/changelog.CSW" "$(PKGROOT)$(docdir)/vsftpd/changelog.CSW" |
|---|
| 166 | ginstall -D "$(WORKDIR_FIRSTMOD)/README.CSW" "$(PKGROOT)$(docdir)/vsftpd/README.CSW" |
|---|
| 167 | |
|---|
| 168 | merge-special-directories: |
|---|
| 169 | ginstall -d "$(PKGROOT)/var/opt/csw/empty/vsftpd" |
|---|
| 170 | ginstall -d "$(PKGROOT)/var/opt/csw/ftp" |
|---|
| 171 | |
|---|