Added by Gavin, last edited by Nico Edtinger on Feb 23, 2007  (view change) show comment

Labels

 

Unix and Linux Distribution Packages

Package volunteers wanted!

After version 1.0 is released, there will most likely be a great demand for native packages for each Unix/Linux distribution. We're looking for volunteers to maintain such packages. If you're interested, please be sure to see Choosing Your Application's Directory Layout. Once your package is ready, add it to the list!

Each Unix/Linux distribution has one or more "preferred" ways to install packages, such as emerge for Gentoo, apt-get for Debian, yum, and so on. The following packages are geared toward these methods.

FreeBSD

Package maintained by Gregory C Larkin

Usage:

cd /usr/ports/www/zend-framework && make install clean

Gentoo

Package maintained by Sebastian Bergmann

Usage:

emerge -p ZendFramework

Mac OS X

Mac OS Forge has a ticket (registration required) with a portfile for DarwinPorts. Portfile without registration maintained by Nico Edtinger

Before making a bunch of packages/installers that put things in whatever place that packager wishes to, shouldn't we maybe determine some standard file locations, in example:

ZendFramework-0.x.x/documentation => /usr/share/doc/ZendFramework
ZendFramework-0.x.x/demos => /usr/share/doc/ZendFramework/demo
ZendFramework-0.x.x/tests => /usr/share/doc/ZendFramework/tests
ZendFramework-0.x.x/library => /usr/share/ZendFramework/

ZendFramework-0.x.x/LICENSE.txt => /usr/share/doc/ZendFramework/
ZendFramework-0.x.x/NEWS.txt => /usr/share/doc/ZendFramework/
ZendFramework-0.x.x/README.txt => /usr/share/doc/ZendFramework/

And what of /incubator ?

Another thing is whether we want to break it out into multiple packages (like ZendFramework, ZendFramework-incubator, ZendFramework-demos, etc.

I don't know how it works for other distributions, but Debian mostly ignore whatever the default paths for an app are in favour of consistency across all apps in the distribution.

And how does this map on to Windows? Or MacOS X?

It's not up to us decide that sort of thing globally - it's down to whatever makes sense for the particular platform the package is targeted at.

I would suggest for Linux and other UNIX-like platforms, that we adhere to the Filesystem Heirarchy Standard (http://www.pathname.com/fhs/pub/fhs-2.3.html). Most vendor-related files should live under /opt.

Based on the FHS, I would expect to see the layout like this:

/opt/ZendFramework/doc => this is where the ZF manual and api doc lives
/opt/ZendFramework/lib => this is where the ZF class library lives
/opt/Zend/ZendFramework/lib/tests => self-explanatory
/etc/opt/ => stores ZF-specific config files
/var/opt/ZendFramework/ => stores ZF-specific temp files, cache files, log files, etc.

The incubator is tricky. I wouldn't think it should live together with production-ready ZF files. So providing another package for it makes sense, e.g.,

/opt/ZendFramework-incubator/... (same hierarchy)

Mac OS X seems to have its own conventions, e.g.,

/Library/Zend Framework/doc
/Library/Zend Framework/lib
/Library/Zend Framework/lib/tests
/Library/Zend Framework/etc
/Library/Zend Framework/logs
/Library/Zend Framework/temp

/Library/Zend Framework incubator/... (same hierarchy)

On Windows, what I'd choose is:

C:\Program Files\Zend Technologies\Zend Framework\lib
C:\Program Files\Zend Technologies\Zend Framework\lib
C:\Program Files\Zend Technologies\Zend Framework\lib\tests
C:\Program Files\Zend Technologies\Zend Framework\conf
C:\Program Files\Zend Technologies\Zend Framework\logs => for logs
C:\Program Files\Zend Technologies\Zend Framework\temp => for ephemeral cache files

Likewise, incubator gets its own matching heirarchy:

C:\Program Files\Zend Technologies\Zend Framework incubator\... (same hierarchy)

For flavors of Linux that I've used, I don't agree. I think each Linux flavor has its own interpretation of FHS and standardized layouts. If distro maintainers follow a specific layout recommended here, it likely will conflict with the layouts expected by users of any particular Linux distro, partly because the location of PHP "libraries" (such as the ZF) are less standardized between distros. However, standards specific to each major distro do exist, for placement of PHP and PEAR.

I believe both Sebastian and Gregory have made reasonable choices in the "layouts" for the OS/distro they support, such that distro users should not be suprised by an unexpected/inconsistent placement of files with respect to their distro.

Posted by Gavin at Nov 08, 2006 13:18

A good file structure is always needed for consistency, but they vary from platform to platform. IMHO there should be a guideline to group documentation in some place with a logical hierchary in order to make it easy to find and follow.

I might be a bit off here, but I've installed it but even thought I put the right "include_path = " to php.ini I'm getting Fatal error: Class 'Zend_Gdata_AuthSub' not found in...

Could it be that Apache doesn't have access to /usr/local/share/ZendFramework? If so how do I provide it with those permissions. Thanks!