Probleme beim eigenen Port (Makefile) erstellen

BeNeDeLux

Wissensbegierig
Hallo Zusammen,

ich möchte gerne für ispCP Omega einen Port bauen bzw. mal damit anfangen.
Es sollen alle nötigen Pakete für ispCP mit den dafür benötigten Optionen installiert werden. Ich habe hierzu auch schon eine Makfile, distinfo, pkg-descr erstellt und nach /usr/ports/www verschoben.

Beim make install bekomme ich allerdings folgenden Fehler:
Code:
[root@matrix /usr/ports/www/ispcp]# make install
=> ispcp-omega-1.0.4.tar.bz2 is not in /usr/ports/www/ispcp/distinfo.
=> Either /usr/ports/www/ispcp/distinfo is out of date, or
=> ispcp-omega-1.0.4.tar.bz2 is spelled incorrectly.
*** Error code 1

Stop in /usr/ports/www/ispcp.
[root@matrix /usr/ports/www/ispcp]#
Mir ist jetzt nicht so klar warum das an dieser stelle nicht klappt.
Bevor die MD5-Summe geprüft werden kann muss die .tar.bz2 Datei doch erstmal heruntergeladen werden. Der Dateinamen in der Makfile ist identisch mit der in der distinfo.

Makefile:
Code:
# New ports collection makefile for:    ispCP Omega
# Date created:                         Mar 12 2010
# Whom:                                 BeNe
#
# $FreeBSD: ports/www/ispcp/Makefile,v 0.1 2010/03/12 09:27:31 BeNe Exp $
#

PORTNAME=               ispcp-omega
PORTVERSION=            1.0.4
CATEGORIES=             www
MASTER_SITES=           ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=     ispcp/ispCP%20Omega/ispCP%20Omega%20${PORTVERSION}
DISTNAME=               ${PORTNAME}-${PORTVERSION}
DISTFILES=              ${DISTNAME}.tar.bz2
DIST_SUBDIR=            ${PORTNAME}

MAINTAINER=             BeNe
COMMENT=                ispCP Omega is an Open Source Virtual Hosting System

USE_APACHE=             yes
USE_MYSQL=              yes
USE_PHP=                bz2 ctype curl dba dom fileinfo filter ftp gd gettext hash iconv imap json mbstring mcrypt mhash mysql mysqli pcre pdo pdo_sqlite\
                        posix session shmop simplexml soap sockets spl tokenizer xml xmlreader xmlrpc xmlwriter zip zlib
USE_POSTFIX=            pcre sasl2 tls mysql cdb vda

PKGMESSAGE=             ${WRKDIR}/pkg-message
SUB_FILES=              pkg-message

RUN_DEPENDS=    ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \
                ${LOCALBASE}/bin/mysqld_safe:${PORTSDIR}/databases/mysql50-server \
                ${LOCALBASE}/sbin/proftpd:${PORTSDIR}/ftp/proftpd \
                ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22 \
                ${LOCALBASE}/sbin/postfix:${PORTSDIR}/mail/postfix  \
                ${LOCALBASE}/sbin/postgrey:${PORTSDIR}/mail/postgrey \
                ${LOCALBASE}/sbin/logrotate:${PORTSDIR}/sysutils/logrotate \
                ${LOCALBASE}/bin/php:${PORTSDIR}/lang/php5 \
                ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget \
                ${LOCALBASE}/bin/procmail:${PORTSDIR}/mail/procmail \
                ${LOCALBASE}/bin/maildrop:${PORTSDIR}/mail/maildrop \
                ${LOCALBASE}/bin/policyd-weight:${PORTSDIR}/mail/postfix-policyd-weight \
                ${LOCALBASE}/www/awstats/cgi-bin/awstats.pl:${PORTSDIR}/www/awstats \
                ${LOCALBASE}/sbin/chkrootkit:${PORTSDIR}/security/chkrootkit \
                ${LOCALBASE}/bin/rkhunter:${PORTSDIR}/security/rkhunter \
                ${LOCALBASE}/libexec/apache22/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi \
                ${LOCALBASE}/libexec/apache22/mod_fcgid.so:${PORTSDIR}/www/mod_fcgid \
                ${LOCALBASE}/libexec/apache22/mod_cband.so:${PORTSDIR}/www/mod_cband \
                ${LOCALBASE}/sbin/amavisd:${PORTSDIR}/security/amavisd-new \
                ${LOCALBASE}/bin/imapd:${PORTSDIR}/mail/courier-imap \
                ${LOCALBASE}/bin/pear:${PORTSDIR}/devel/pear \
                ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI \
                ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql50 \
                ${SITE_PERL}/MIME/Entity.pm:${PORTSDIR}/mail/p5-MIME-Tools \
                ${SITE_PERL}/Crypt/CBC.pm:${PORTSDIR}/security/p5-Crypt-CBC \
                ${SITE_PERL}/Crypt/PasswdMD5.pm:${PORTSDIR}/security/p5-Crypt-PasswdMD5 \
                ${SITE_PERL}/${PERL_ARCH}/Crypt/Blowfish.pm:${PORTSDIR}/security/p5-Crypt-Blowfish \
                ${SITE_PERL}/Term/ReadPassword.pm:${PORTSDIR}/devel/p5-Term-ReadPassword

# We need Apache > = 2.x

CONFLICTS=      apache+mod_ssl-1.* apache+mod_ssl+ipv6-1.* apache+mod_ssl+modsnmp-1.* \
                apache+mod_ssl+mod_snmp+ipv6-1.* apache+mod_ssl+mod_accel-1.* \
                apache+mod_ssl+mod_snmp+mod_accel-1.* \
                apache+ipv6-1.* apache+ssl-1.* apache-1.* apache_fp-1.* \
                caudium-devel-1.* caudium10-1.* caudium12-* \
                ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.*

WRKSRC=         ${WRKDIR}/${PORTNAME}-${PORTVERSION}

#do-extract:
#        @${MKDIR} ${WRKSRC}
#        @${TAR} -yxf ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX} -C ${WRKSRC}

#do-install:
#        @${MKDIR} ${WWWDIR}
#        @cd ${WRKSRC} && \
#                ${FIND} . -type d -exec ${MKDIR} ${WWWDIR}/{} \; \
#                        -exec ${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/{} \;
#        @cd ${WRKSRC} && \
#                ${FIND} . \! -type d -exec ${INSTALL_DATA} {} ${WWWDIR}/{} \; \
#                        -exec ${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/{} \;

#post-install:
#        @${CAT} ${PKGMESSAGE}

#####################################################
# For later use to patch ispCP Configs for FreeBSD

# pre-fetch:
    # i go fetch something, yeah

# post-patch:
    # i need to do something after patch, great

# pre-install:
    # and then some more stuff before installing, wow


.include <bsd.port.mk>
######################################################
# Ports to check RUN_DEPENDS

#/usr/ports/security/courier-authlib
#/usr/ports/databases/mysql50-client
#/usr/ports/lang/php5-extensions
#/usr/ports/lang/perl5.10
#/usr/ports/databases/p5-Class-DBI-mysql
#/usr/ports/archivers/p5-Compress-Zlib
#/usr/ports/security/p5-Crypt-DES
#/usr/ports/security/p5-Crypt-SSLeay
#/usr/ports/textproc/p5-HTML-Entities-Numbered
#/usr/ports/www/p5-HTML-Parser
#/usr/ports/www/p5-HTML-Tagset
#/usr/ports/www/p5-HTTP-GHTTP
#/usr/ports/devel/p5-IO-stringy
#/usr/ports/mail/p5-MIME-Tools
#/usr/ports/mail/p5-Mail-Tools
#/usr/ports/net/p5-Net-Daemon
#/usr/ports/dns/p5-Net-LibIDN
#/usr/ports/net/p5-PlRPC
#/usr/ports/net/p5-URI
#/usr/ports/www/p5-libwww
#/usr/ports/devel/p5-Term-ReadKey
#/usr/ports/devel/p5-File-MimeInfo
#/usr/ports/mail/p5-MIME-Tools
#/usr/ports/textproc/p5-YAML
distinfo:
Code:
MD5 (ispcp/ispcp-omega-1.0.4.tar.bz2) = c4b095784853be004ac1e064e094981a
SIZE (ispcp/ispcp-omega-1.0.4.tar.bz2) = 14559161
Das ist das erste mal das ich so eine Makefile baue. Dank der guten Dokumentation von FreeBSD ging es bis hier her auch ganz gut.

Kann mir einer sagen woran das hier liegt ?

Thanks & Greez
BeNe
 
You made my day! Hat funktioniert.

In dem Fall hätte ich das ja garnicht selber machen müssen :o
Schon wieder was dazu gelernt.

Jetzt holt die Makefile das Archiv, prüft die Checksum erfolgreich und testet die ersten Abhängigkeiten. Leider hänge ich jetzt schon wieder:

Code:
matrix# make install
===>  Extracting for ispcp-omega-1.0.4
=> MD5 Checksum OK for ispcp-omega/ispcp-omega-1.0.4.tar.bz2.
=> SHA256 Checksum OK for ispcp-omega/ispcp-omega-1.0.4.tar.bz2.
===>  Patching for ispcp-omega-1.0.4
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/apxs - found
===>   ispcp-omega-1.0.4 depends on shared library: mysqlclient.15 - found
===>  Configuring for ispcp-omega-1.0.4
===>  Building for ispcp-omega-1.0.4
"Makefile", line 32: Need an operator
"Makefile", line 34: Need an operator
"Makefile", line 52: Need an operator
make: fatal errors encountered -- cannot continue
*** Error code 1

Stop in /usr/ports/www/ispcp.
Warum sollte in der Zeile 32,34 und 52 ein Operator fehlen ?
Code:
${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22 \
${LOCALBASE}/sbin/postgrey:${PORTSDIR}/mail/postgrey \
${SITE_PERL}/MIME/Entity.pm:${PORTSDIR}/mail/p5-MIME-Tools \
Habe hier über Operatoren gelesen (http://www.netbsd.org/docs/pkgsrc/makefile.html)
Nur sehen die Zeilen doch aus wie alle anderen die er nicht an meckert.

Was mir auch noch etwas unklar ist, wie lege ich genau Optionen für ein Paket fest ?

Habe hier in dieser Makefile die Optionen für PHP festgelegt. War da recht einfach weil der Port ja nur "php" heißt.
Wie sieht es jetzt aber bei "p5-Mail-SpamAssassin" Heißt die Option dann:
Code:
spamassassin= OPTION1 OPTION2
oder
Code:
p5-Mail-SPAMASSASSIN= OPTION1 OPTION2
Wie bekomme ich den Apache als Worker mit meiner Makfile hin ?
Hab es bisher in der Makefile vom Apache22 immer selber unter
Code:
WITH_MPM= worker
festgelegt, aber wie geht das jetzt in meiner eigenen Makefile ? Auch so ?
Es muss ja irgendwie der Bezug zu Paket "Apache22" hergestellt werden.

Danke nochmals!
Greez BeNe
 
richtig, die obige Fehlermeldung ist typisch für GNUmakefiles.

Code:
USE_GMAKE=      yes

Die Fehlermeldung bezieht sich auf das Makefile in ${WRKSRC}.
 
:) Ja Ihr habt recht!
Ich sehe schon, alleine werde ich das nicht schaffen.

Jetzt habe ich folgenden Fehler:
Code:
atrix# make install
===>  Extracting for ispcp-omega-1.0.4
=> MD5 Checksum OK for ispcp-omega/ispcp-omega-1.0.4.tar.bz2.
=> SHA256 Checksum OK for ispcp-omega/ispcp-omega-1.0.4.tar.bz2.


===>  Patching for ispcp-omega-1.0.4
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/apxs - found
===>   ispcp-omega-1.0.4 depends on executable: gmake - found
===>   ispcp-omega-1.0.4 depends on shared library: mysqlclient.15 - found
===>  Configuring for ispcp-omega-1.0.4
===>  Building for ispcp-omega-1.0.4
gmake: *** No rule to make target `all'.  Stop.
*** Error code 1

Stop in /usr/ports/www/ispcp.
Liegt es jetzt daran das ich keine weitere Anweisung in der Makefile habe ?
Code:
# New ports collection makefile for:    ispCP Omega
# Date created:                         Mar 12 2010
# Whom:                                 BeNe
#
# $FreeBSD: ports/www/ispcp/Makefile,v 0.1 2010/03/12 16:42:29 BeNe Exp $
#

PORTNAME=               ispcp-omega
PORTVERSION=            1.0.4
CATEGORIES=             www
MASTER_SITES=           ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=    ispcp/ispCP%20Omega/ispCP%20Omega%20${PORTVERSION}
DISTNAME=               ${PORTNAME}-${PORTVERSION}
DISTFILES=              ${DISTNAME}.tar.bz2
DIST_SUBDIR=            ${PORTNAME}

MAINTAINER=        BeNe
COMMENT=        ispCP Omega is an Open Source Virtual Hosting System

USE_GMAKE=        yes
USE_APACHE=        yes 
USE_MYSQL=          yes
USE_PHP=            bz2 ctype curl dba dom fileinfo filter ftp gd gettext hash iconv imap json mbstring mcrypt mhash mysql mysqli pcre pdo pdo_sqlite\
            posix session shmop simplexml soap sockets spl tokenizer xml xmlreader xmlrpc xmlwriter zip zlib        
USE_POSTFIX=         pcre sasl2 tls mysql cdb vda
    
PKGMESSAGE=        ${WRKDIR}/pkg-message
SUB_FILES=        pkg-message

RUN_DEPENDS=    ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \
        ${LOCALBASE}/bin/mysqld_safe:${PORTSDIR}/databases/mysql50-server \
        ${LOCALBASE}/sbin/proftpd:${PORTSDIR}/ftp/proftpd \
        ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22 \
        ${LOCALBASE}/sbin/postfix:${PORTSDIR}/mail/postfix  \
        ${LOCALBASE}/sbin/postgrey:${PORTSDIR}/mail/postgrey \
        ${LOCALBASE}/sbin/logrotate:${PORTSDIR}/sysutils/logrotate \
        ${LOCALBASE}/bin/php:${PORTSDIR}/lang/php5 \
        ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget \
        ${LOCALBASE}/bin/procmail:${PORTSDIR}/mail/procmail \
        ${LOCALBASE}/bin/maildrop:${PORTSDIR}/mail/maildrop \
        ${LOCALBASE}/bin/policyd-weight:${PORTSDIR}/mail/postfix-policyd-weight \
        ${LOCALBASE}/www/awstats/cgi-bin/awstats.pl:${PORTSDIR}/www/awstats \
        ${LOCALBASE}/sbin/chkrootkit:${PORTSDIR}/security/chkrootkit \
        ${LOCALBASE}/bin/rkhunter:${PORTSDIR}/security/rkhunter \
        ${LOCALBASE}/libexec/apache22/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi \
        ${LOCALBASE}/libexec/apache22/mod_fcgid.so:${PORTSDIR}/www/mod_fcgid \
        ${LOCALBASE}/libexec/apache22/mod_cband.so:${PORTSDIR}/www/mod_cband \
        ${LOCALBASE}/sbin/amavisd:${PORTSDIR}/security/amavisd-new \
        ${LOCALBASE}/bin/imapd:${PORTSDIR}/mail/courier-imap \
        ${LOCALBASE}/bin/pear:${PORTSDIR}/devel/pear \
        ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI \
        ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql50 \
        ${SITE_PERL}/MIME/Entity.pm:${PORTSDIR}/mail/p5-MIME-Tools \
        ${SITE_PERL}/Crypt/CBC.pm:${PORTSDIR}/security/p5-Crypt-CBC \
        ${SITE_PERL}/Crypt/PasswdMD5.pm:${PORTSDIR}/security/p5-Crypt-PasswdMD5 \
        ${SITE_PERL}/${PERL_ARCH}/Crypt/Blowfish.pm:${PORTSDIR}/security/p5-Crypt-Blowfish \
        ${SITE_PERL}/Term/ReadPassword.pm:${PORTSDIR}/devel/p5-Term-ReadPassword

# We need Apache > = 2.x 

CONFLICTS=    apache+mod_ssl-1.* apache+mod_ssl+ipv6-1.* apache+mod_ssl+modsnmp-1.* \
        apache+mod_ssl+mod_snmp+ipv6-1.* apache+mod_ssl+mod_accel-1.* \
        apache+mod_ssl+mod_snmp+mod_accel-1.* \
        apache+ipv6-1.* apache+ssl-1.* apache-1.* apache_fp-1.* \
        caudium-devel-1.* caudium10-1.* caudium12-* \
        ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.*
                
WRKSRC=        ${WRKDIR}/${PORTNAME}-${PORTVERSION}

#do-extract:
#        @${MKDIR} ${WRKSRC}
#        @${TAR} -yxf ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX} -C ${WRKSRC}

#do-install:
#        @${MKDIR} ${WWWDIR}
#        @cd ${WRKSRC} && \
#                ${FIND} . -type d -exec ${MKDIR} ${WWWDIR}/{} \; \
#                        -exec ${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/{} \;
#        @cd ${WRKSRC} && \
#                ${FIND} . \! -type d -exec ${INSTALL_DATA} {} ${WWWDIR}/{} \; \
#                        -exec ${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/{} \;

#post-install:
#        @${CAT} ${PKGMESSAGE}

#####################################################
# For later use to patch ispCP Configs for FreeBSD

# pre-fetch:
    # i go fetch something, yeah

# post-patch:
    # i need to do something after patch, great

# pre-install:
    # and then some more stuff before installing, wow


.include <bsd.port.mk>
######################################################
# Ports to check RUN_DEPENDS

#/usr/ports/security/courier-authlib 
#/usr/ports/databases/mysql50-client 
#/usr/ports/lang/php5-extensions 
#/usr/ports/lang/perl5.10
#/usr/ports/databases/p5-Class-DBI-mysql
#/usr/ports/archivers/p5-Compress-Zlib 
#/usr/ports/security/p5-Crypt-DES 
#/usr/ports/security/p5-Crypt-SSLeay 
#/usr/ports/textproc/p5-HTML-Entities-Numbered
#/usr/ports/www/p5-HTML-Parser 
#/usr/ports/www/p5-HTML-Tagset 
#/usr/ports/www/p5-HTTP-GHTTP 
#/usr/ports/devel/p5-IO-stringy 
#/usr/ports/mail/p5-MIME-Tools 
#/usr/ports/mail/p5-Mail-Tools 
#/usr/ports/net/p5-Net-Daemon 
#/usr/ports/dns/p5-Net-LibIDN 
#/usr/ports/net/p5-PlRPC 
#/usr/ports/net/p5-URI 
#/usr/ports/www/p5-libwww 
#/usr/ports/devel/p5-Term-ReadKey 
#/usr/ports/devel/p5-File-MimeInfo
#/usr/ports/mail/p5-MIME-Tools
#/usr/ports/textproc/p5-YAML
Was mich ebenfalls noch wundert das er nur drei Abhänigkeiten prüft ?
Code:
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/apxs - found
===>   ispcp-omega-1.0.4 depends on executable: gmake - found
===>   ispcp-omega-1.0.4 depends on shared library: mysqlclient.15 - found
Oder Zeigt er einfach nicht alle an ?

Vielen Vielen Dank für eure Hilfe! Wusste garnicht das eine Makefile so spannend sein kann.

Thanks,
BeNe
 
===> Building for ispcp-omega-1.0.4


Bitte beachte...
nach
===> Building for ispcp-omega-1.0.4
rennt das Makefile/GNUmakefile im ${WRKSRC}
nicht das Makefile des ports!

gmake: *** No rule to make target `all'. Stop.

Hier muss man sich das Makefile in ${WRKSRC} ansehen.

a) Vermutlich benötigt man vorher "./Configure" und das Makefile
in den Quellen erst zu erstellen.

Code:
GNU_CONFIGURE=yes

b) Falls das Makefile vollständig ist und das Binary
genannt werden muss:

Code:
ALL_TARGET= ispcp-omega
 
@Elwood
Danke für den Hinweis, habe es eben abgeändert.

@Dinoex

Also in dem Fall gibt es schon eine Fertige "BSDMakefile" in ${WRKSRC}:
Code:
[root@matrix /usr/ports/www/ispcp]# ls -la
total 62K
drwxr-xr-x    3 root wheel   512 Mar 12 21:29 .
drwxr-xr-x 1924 root wheel 49152 Mar 12 14:37 ..
-rw-r--r--    1 root wheel  5095 Mar 13 17:38 Makefile
-rw-r--r--    1 root wheel   249 Mar 12 19:37 distinfo
-rw-r--r--    1 root wheel   623 Mar 12 14:26 pkg-descr
drwxr-xr-x    3 root wheel   512 Mar 12 21:29 work
[root@matrix /usr/ports/www/ispcp]# cd work/
[root@matrix /usr/ports/www/ispcp/work]# ls -la
total 6K
drwxr-xr-x  3 root wheel 512 Mar 12 21:29 .
drwxr-xr-x  3 root wheel 512 Mar 12 21:29 ..
-rw-r--r--  1 root wheel   0 Mar 12 21:29 .configure_done.ispcp-omega._usr_local
-rw-r--r--  1 root wheel   0 Mar 12 21:29 .extract_done.ispcp-omega._usr_local
-rw-r--r--  1 root wheel   0 Mar 12 21:29 .patch_done.ispcp-omega._usr_local
drwxr-xr-x 11 root wheel 512 Feb 28 22:27 ispcp-omega-1.0.4
[root@matrix /usr/ports/www/ispcp/work]# cd ispcp-omega-1.0.4/
[root@matrix /usr/ports/www/ispcp/work/ispcp-omega-1.0.4]# ls -la
total 110K
drwxr-xr-x 11 root wheel   512 Feb 28 22:27 .
drwxr-xr-x  3 root wheel   512 Mar 12 21:29 ..
-rw-r--r--  1 root wheel  4434 Feb 19 23:37 BSDmakefile
-rw-r--r--  1 root wheel 44505 Feb 28 20:31 CHANGELOG
-rw-r--r--  1 root wheel  2902 Jan  6 21:30 Makefile
-rw-r--r--  1 root wheel  2893 Jan  6 21:30 Makefile.centos
-rw-r--r--  1 root wheel  1787 Jan  6 21:30 Makefile.fbsd
-rw-r--r--  1 root wheel  2892 Jan  6 21:30 Makefile.fedora
-rw-r--r--  1 root wheel  3216 Jan  6 21:30 Makefile.gentoo
-rw-r--r--  1 root wheel  1711 Jan  6 21:30 Makefile.inc
-rw-r--r--  1 root wheel  2960 Jan  6 21:30 Makefile.opensuse
-rw-r--r--  1 root wheel  2894 Jan  6 21:30 Makefile.ubuntu
-rw-r--r--  1 root wheel  2666 Jan  6 21:30 README
drwxr-xr-x 11 root wheel   512 Feb 28 22:27 configs
drwxr-xr-x  2 root wheel   512 Feb 28 22:27 contrib
drwxr-xr-x  2 root wheel   512 Feb 28 22:27 database
drwxr-xr-x 12 root wheel   512 Feb 28 22:27 docs
drwxr-xr-x  9 root wheel  1024 Feb 28 22:27 engine
drwxr-xr-x 13 root wheel   512 Feb 28 22:27 gui
-rw-r--r--  1 root wheel  5472 Aug 23  2009 ispcp-omega.spec
drwxr-xr-x  2 root wheel   512 Feb 28 22:27 keys
drwxr-xr-x  4 root wheel   512 Feb 28 22:26 language-files
drwxr-xr-x  4 root wheel   512 Feb 28 22:27 tools
[root@matrix /usr/ports/www/ispcp/work/ispcp-omega-1.0.4]#
Die Makefile funktioniert bis hier her, prüft jetzt auch alle Abhängigkeiten und rennt jetzt ins ${WRKSRC}. Hier liegen jetzt leider mehrere Makefiles.
Code:
-rw-r--r--  1 root wheel  4434 Feb 19 23:37 BSDmakefile
-rw-r--r--  1 root wheel  2902 Jan  6 21:30 Makefile
-rw-r--r--  1 root wheel  2893 Jan  6 21:30 Makefile.centos
-rw-r--r--  1 root wheel  1787 Jan  6 21:30 Makefile.fbsd
-rw-r--r--  1 root wheel  2892 Jan  6 21:30 Makefile.fedora
-rw-r--r--  1 root wheel  3216 Jan  6 21:30 Makefile.gentoo
-rw-r--r--  1 root wheel  1711 Jan  6 21:30 Makefile.inc
-rw-r--r--  1 root wheel  2960 Jan  6 21:30 Makefile.opensuse
-rw-r--r--  1 root wheel  2894 Jan  6 21:30 Makefile.ubuntu
Die "Makefile" ist für Debian Linux und die "BSDmakefile" für BSD.
Jetzt ist es aber leider so das die "Makefile" genommen wird.
War der Meinung das die Reigenfolge BSDmakefile, makefile und Makefile war ?!

Kann ich erzwingen das er die BSDmakefile nimmt ?
Oder kann ich vorher vielleich die anderen weglöschen ?

Zum Verständniss der ganzen Geschichte, hier habe ich eine Installationsanleitung für ispCP auf FreeBSD geschrieben.
Und das würde ich jetzt gerne über einem Makefile umsetzten, also was das Installieren der benötigten Ports und deren Optionen angeht.

Dank eurer Hilfe habe ich es jetzt schon soweit gebracht - D A N K E ;)

Greez BeNe
 
Im Makefile des ports:

Code:
MAKEFILE=  BSDmakefile

Dafür aber das "gnake" wieder entfernen
Code:
# USE_GMAKE=yes
 
Tatsache! :)
Jetzt spingt make in mein ${WRKSRC} und macht mit der "BSDMakefile" weiter, super.

Habe das Makfile grad mal auf einem FreeBSD Grundsystem laufen lassen, und stelle fest das Apache13 anstatt Apache22 installiert wird ?
Code:
root# make install
===>  Vulnerability check disabled, database not found
=> ispcp-omega-1.0.4.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/ispcp-omega.
=> Attempting to fetch from http://heanet.dl.sourceforge.net/project/ispcp/ispCP%20Omega/ispCP%20Omega%201.0.4/.
ispcp-omega-1.0.4.tar.bz2                     100% of   13 MB 2224 kBps
===>  Extracting for ispcp-omega-1.0.4
=> MD5 Checksum OK for ispcp-omega/ispcp-omega-1.0.4.tar.bz2.
=> SHA256 Checksum OK for ispcp-omega/ispcp-omega-1.0.4.tar.bz2.
===>  Patching for ispcp-omega-1.0.4
===>  Applying distribution patches for ispcp-omega-1.0.4
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/apxs - not found
===>    Verifying install for /usr/local/sbin/apxs in /usr/ports/www/apache13
===>  Vulnerability check disabled, database not found
=> apache_1.3.42.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://www.apache.org/dist/httpd/.
Dabei zeige ich auf den Apache22:
Code:
RUN_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22 \
Wie bekomme ich es denn hin das mir die Optionen für die jeweiligen Ports automatisch gesetzt werden mit dieser Makefile ?
Im Moment geht bei den Ports mit Optionen ein Fenster auf wo ich die Module anwählen kann. Hier ist aber alles auf Defautlwerte gesetzt und nicht was hier hier festgelegt habe:
Code:
USE_PHP=                bz2 ctype curl dba dom fileinfo filter ftp gd gettext hash iconv imap json mbstring mcrypt mhash mysql mysqli pcre pdo pdo_sqlite\
                        posix session shmop simplexml soap sockets spl tokenizer xml xmlreader xmlrpc xmlwriter zip zlib
USE_POSTFIX=            pcre sasl2 tls mysql cdb vda
In der Makefile.sample habe ich gesehen das ich mit "INTERACTIVE = YES/NO" arbeiten kann.
Bringt mir aber im Moment noch nichts das auf "NO" zu setzen solange das Makefile mir nicht meine benötigten Module selber aktiviert.

Die Angaben von oben wie USE=PHP oder USE=Postfix sehe ich am Anfang beim make
Code:
matrix# make install
===>  Installing for ispcp-omega-1.0.4
===>   ispcp-omega-1.0.4 depends on file: /usr/local/bin/bash - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/bin/mysqld_safe - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/proftpd - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/apxs - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/postfix - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/postgrey - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/logrotate - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/bin/php - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/bin/wget - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/bin/procmail - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/bin/maildrop - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/bin/policyd-weight - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/www/awstats/cgi-bin/awstats.pl - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/chkrootkit - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/bin/rkhunter - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/libexec/apache22/mod_fastcgi.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/libexec/apache22/mod_fcgid.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/libexec/apache22/mod_cband.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/sbin/amavisd - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/bin/imapd - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/bin/pear - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/perl5/site_perl/5.10.1/mach/DBI.pm - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/perl5/site_perl/5.10.1/mach/DBD/mysql.pm - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/perl5/site_perl/5.10.1/MIME/Entity.pm - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/perl5/site_perl/5.10.1/Crypt/CBC.pm - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/perl5/site_perl/5.10.1/Crypt/PasswdMD5.pm - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/perl5/site_perl/5.10.1/mach/Crypt/Blowfish.pm - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/perl5/site_perl/5.10.1/Term/ReadPassword.pm - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/bz2.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/ctype.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/curl.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/dba.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/dom.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/fileinfo.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/filter.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/ftp.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/gd.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/gettext.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/hash.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/iconv.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/imap.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/json.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/mbstring.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/mcrypt.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/mhash.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/mysql.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/mysqli.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/pcre.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/pdo.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/pdo_sqlite.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/posix.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/session.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/shmop.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/simplexml.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/soap.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/sockets.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/spl.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/tokenizer.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/xml.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/xmlreader.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/xmlrpc.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/xmlwriter.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/zip.so - found
===>   ispcp-omega-1.0.4 depends on file: /usr/local/lib/php/20060613/zlib.so - found
===>   ispcp-omega-1.0.4 depends on shared library: mysqlclient.15 - found
===>   Generating temporary packing list
Heißt das es nur Abhängigkeiten sind keine gewählte Optionen ?

Hier mal die aktuelle Makefile:
Code:
# New ports collection makefile for:    ispCP Omega
# Date created:                         Mar 13 2010
# Whom:                                 BeNe
#
# $FreeBSD$
#

PORTNAME=               ispcp-omega
PORTVERSION=            1.0.4
CATEGORIES=             www
MASTER_SITES=           ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=     ispcp/ispCP%20Omega/ispCP%20Omega%20${PORTVERSION}
DISTNAME=               ${PORTNAME}-${PORTVERSION}
DISTFILES=              ${DISTNAME}.tar.bz2
DIST_SUBDIR=            ${PORTNAME}

PATCH_SITES=            # ftp://site.for.ispcp-patchs.tld
PATCHFILES=             # needed.patches.for.freebsd.gz

MAINTAINER=             bene@my-domain.tld
COMMENT=                ispCP Omega is an Open Source Virtual Hosting System

####################################################
# disabled gmake to use BSDMakefile
# USE_GMAKE=            yes

MAKEFILE=               BSDmakefile
USE_APACHE=             yes
USE_MYSQL=              yes
USE_PHP=                bz2 ctype curl dba dom fileinfo filter ftp gd gettext hash iconv imap json mbstring mcrypt mhash mysql mysqli pcre pdo pdo_sqlite\
                        posix session shmop simplexml soap sockets spl tokenizer xml xmlreader xmlrpc xmlwriter zip zlib
USE_POSTFIX=            pcre sasl2 tls mysql cdb vda

PKGMESSAGE=             pkg-message
SUB_FILES=              pkg-message

####################################################
# disabled bsd.port.mk because of port.pre and port.post
# .include <bsd.port.mk>

.include <bsd.port.pre.mk>

RUN_DEPENDS=    ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \
                ${LOCALBASE}/bin/mysqld_safe:${PORTSDIR}/databases/mysql50-server \
                ${LOCALBASE}/sbin/proftpd:${PORTSDIR}/ftp/proftpd \
                ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22 \
                ${LOCALBASE}/sbin/postfix:${PORTSDIR}/mail/postfix  \
                ${LOCALBASE}/sbin/postgrey:${PORTSDIR}/mail/postgrey \
                ${LOCALBASE}/sbin/logrotate:${PORTSDIR}/sysutils/logrotate \
                ${LOCALBASE}/bin/php:${PORTSDIR}/lang/php5 \
                ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget \
                ${LOCALBASE}/bin/procmail:${PORTSDIR}/mail/procmail \
                ${LOCALBASE}/bin/maildrop:${PORTSDIR}/mail/maildrop \
                ${LOCALBASE}/bin/policyd-weight:${PORTSDIR}/mail/postfix-policyd-weight \
                ${LOCALBASE}/www/awstats/cgi-bin/awstats.pl:${PORTSDIR}/www/awstats \
                ${LOCALBASE}/sbin/chkrootkit:${PORTSDIR}/security/chkrootkit \
                ${LOCALBASE}/bin/rkhunter:${PORTSDIR}/security/rkhunter \
                ${LOCALBASE}/libexec/apache22/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi \
                ${LOCALBASE}/libexec/apache22/mod_fcgid.so:${PORTSDIR}/www/mod_fcgid \
                ${LOCALBASE}/libexec/apache22/mod_cband.so:${PORTSDIR}/www/mod_cband \
                ${LOCALBASE}/sbin/amavisd:${PORTSDIR}/security/amavisd-new \
                ${LOCALBASE}/bin/imapd:${PORTSDIR}/mail/courier-imap \
                ${LOCALBASE}/bin/pear:${PORTSDIR}/devel/pear \
                ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI \
                ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql50 \
                ${SITE_PERL}/MIME/Entity.pm:${PORTSDIR}/mail/p5-MIME-Tools \
                ${SITE_PERL}/Crypt/CBC.pm:${PORTSDIR}/security/p5-Crypt-CBC \
                ${SITE_PERL}/Crypt/PasswdMD5.pm:${PORTSDIR}/security/p5-Crypt-PasswdMD5 \
                ${SITE_PERL}/${PERL_ARCH}/Crypt/Blowfish.pm:${PORTSDIR}/security/p5-Crypt-Blowfish \
                ${SITE_PERL}/Term/ReadPassword.pm:${PORTSDIR}/devel/p5-Term-ReadPassword

# We need Apache > = 2.x

CONFLICTS=      apache+mod_ssl-1.* apache+mod_ssl+ipv6-1.* apache+mod_ssl+modsnmp-1.* \
                apache+mod_ssl+mod_snmp+ipv6-1.* apache+mod_ssl+mod_accel-1.* \
                apache+mod_ssl+mod_snmp+mod_accel-1.* \
                apache+ipv6-1.* apache+ssl-1.* apache-1.* apache_fp-1.* \
                caudium-devel-1.* caudium10-1.* caudium12-* \
                ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.*

WRKSRC=         ${WRKDIR}/${PORTNAME}-${PORTVERSION}

#####################################################
# For later use -> placeholder

#do-extract:
#        @${MKDIR} ${WRKSRC}
#        @${TAR} -yxf ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX} -C ${WRKSRC}

#do-install:
#        @${MKDIR} ${WWWDIR}
#        @cd ${WRKSRC} && \
#                ${FIND} . -type d -exec ${MKDIR} ${WWWDIR}/{} \; \
#                        -exec ${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/{} \;
#        @cd ${WRKSRC} && \
#                ${FIND} . \! -type d -exec ${INSTALL_DATA} {} ${WWWDIR}/{} \; \
#                        -exec ${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/{} \;

#post-install:
#        @${CAT} ${PKGMESSAGE}

#####################################################
# For later use to patch ispCP Configs for FreeBSD

# pre-fetch:
    # i go fetch something, yeah

# post-patch:
    # i need to do something after patch, great

# pre-install:
    # and then some more stuff before installing, wow


.include <bsd.port.post.mk>

######################################################
# Ports to check RUN_DEPENDS
#/usr/ports/security/courier-authlib
#/usr/ports/databases/mysql50-client
#/usr/ports/lang/php5-extensions
#/usr/ports/lang/perl5.10
#/usr/ports/databases/p5-Class-DBI-mysql
#/usr/ports/archivers/p5-Compress-Zlib
#/usr/ports/security/p5-Crypt-DES
#/usr/ports/security/p5-Crypt-SSLeay
#/usr/ports/textproc/p5-HTML-Entities-Numbered
#/usr/ports/www/p5-HTML-Parser
#/usr/ports/www/p5-HTML-Tagset
#/usr/ports/www/p5-HTTP-GHTTP
#/usr/ports/devel/p5-IO-stringy
#/usr/ports/mail/p5-MIME-Tools
#/usr/ports/mail/p5-Mail-Tools
#/usr/ports/net/p5-Net-Daemon
#/usr/ports/dns/p5-Net-LibIDN
#/usr/ports/net/p5-PlRPC
#/usr/ports/net/p5-URI
#/usr/ports/www/p5-libwww
#/usr/ports/devel/p5-Term-ReadKey
#/usr/ports/devel/p5-File-MimeInfo
#/usr/ports/mail/p5-MIME-Tools
#/usr/ports/textproc/p5-YAML
Danke für eure und deine Hilfe dinoex!
Versuche wirklich so viel zu möglich lesen und machen.
Leider sind solche sachen nicht in der FreeBSD Dev-Docu und Makefile.sample enthalten.

Thanks & Greez
BeNe
 
Man kann ja mal irgendwo hängen bleiben, aber so langsam nimmt das hier überhand.

Hier geht es bisher ausschließlich um Dinge, die problemlos in der Dokumentation zu finden sind. Eine Menge Menschen habe sich viel Mühe gegeben, das alles zu dokumentieren.
 
Bei den Abhängigkeiten hast du ein Problem.

Auf deinem eigenem System kannst du "make config" oder besser "make config-recursive" machen.

In der /etc/make.conf muss man ebenfalls festlegen,
wenn man nicht den Default benutzt.

Code:
DEFAULT_MYSQL_VER?=51
DEFAULT_PHP_VER?=5
APACHE_PORT?=www/apache22
 
CONFLICTS= apache+mod_ssl-1.* apache+mod_ssl+ipv6-1.* apache+mod_ssl+modsnmp-1.* \
apache+mod_ssl+mod_snmp+ipv6-1.* apache+mod_ssl+mod_accel-1.* \
apache+mod_ssl+mod_snmp+mod_accel-1.* \
apache+ipv6-1.* apache+ssl-1.* apache-1.* apache_fp-1.* \
caudium-devel-1.* caudium10-1.* caudium12-* \
ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.*

CONFLICTS ist nicht dafür gedacht, das solltest du entfernen.
 
Man kann ja mal irgendwo hängen bleiben, aber so langsam nimmt das hier überhand.

Hier geht es bisher ausschließlich um Dinge, die problemlos in der Dokumentation zu finden sind. Eine Menge Menschen habe sich viel Mühe gegeben, das alles zu dokumentieren.
Das ist übrigens bloß meine persönliche Meinung. Keine repräsentative Position.
 
@dinoex
Danke nochmals, jetzt komme ich so langsam dahinter.
Ist noch etwas verwirrend weil ich echt zig Variablen setzen kann/muss um das Ergebniss zu erreichen. Und einige sind eben Systemabhänig - das habe ich jetzt gemerkt. Besten dank für deinen Einsatz hier!

@kamikaze

Ich kann Dich da vollkommen verstehen, wirklich! Leider ist es nur so das solche Fälle nirgends in der Doku beschrieben sind. Bediene mich schon der echt sehr guten FreeBSD Doku, welche mich ja schon so weit gebracht hat. Werde mich jetzt weiter einlesen weil ich es selber schaffen will und euch nicht Löcher in den Bauch fragen möchte. Also nichts für ungut - hast mein volles Verständniss ;)

Thanks & Greez
BeNe
 
Zurück
Oben