Posts Tagged ‘PEAR’

Announcing Pearfarm: Making it trivially easy to create and share PEAR packages.

Posted in Release on January 9th, 2010 by apinstein – 1 Comment

PHP Social CodingThe PHP community has fallen behind some other popular languages in taking advantage of new trends in social coding and code distribution. Take a moment to think about the innovation unleashed by the iPhone App Store, Github and Gemcutter. We think that the PHP community would greatly benefit by leveraging the power of these social innovations.

Pearfarm is the PHP community’s answer to these trends, addressing the core structural problems that reduce cooperation, sharing, and innovation in the PHP community:

1. Simple creation of PEAR packages

With Pearfarm you can create a PEAR-installable package for your library, framework, or executable in minutes. All you have to do is create a pearfarm.spec file for your project and run “pearfarm build”. This is significantly easier to do that authoring your own package.xml file or other PEAR-package-building software, since pearfarm.spec provides a higher-level API to work with:

$spec = Pearfarm_PackageSpec::create(array(Pearfarm_PackageSpec::OPT_BASEDIR => dirname(__FILE__)))
->setName(‘pearfarm’)
->setChannel(‘pearfarm.pearfarm.org’)
->setSummary(‘Build and distribute PEAR packages easily.’)
->setDescription(‘Pearfarm makes it easy to create PEAR packages for your projects and host them on a channel server.’)
->setNotes(‘See http://github.com/fgrehm/pearfarm for changelog, docs, etc.’)
->setReleaseVersion(‘0.1.5′)
->setReleaseStability(‘beta’)
->setApiVersion(‘0.1.0′)
->setApiStability(‘beta’)
->setLicense(Pearfarm_PackageSpec::LICENSE_MIT)
->addMaintainer(‘lead’, ‘Alan Pinstein’, ‘apinstein’, ’apinstein@mac.com’)
->addMaintainer(‘lead’, ‘Fabio Rehm’, ‘fgrehm’, ’fgrehm@gmail.com’)
->addMaintainer(‘lead’, ‘Jonathan Leibiusky’, ‘xetorthio’, ’ionathan@gmail.com’)
->addMaintainer(‘lead’, ‘Scott Davis’, ‘jetviper21′, ’jetviper21@gmail.com ’)
->addGitFiles()
->addFilesRegex(‘/test/’, ‘test’)
->addFilesRegex(‘/^README.markdown/’, ‘doc’)
->addExcludeFiles(array(‘.gitignore’, ‘pearfarm.spec’))
->addExecutable(‘pearfarm’)
;

Pearfarm will even create a basic pearfarm.spec for you; just run “pearfarm init”.

2. Simple hosting of PEAR packages

In case you’ve never tried, setting up a PEAR server is a real pain. Even using the latest tools, you still end up managing a web server just to host a small file. We’re all far too busy to have to manage an extra server just to host a PEAR package.

Pearfarm’s website (http://pearfarm.org) serves as a public PEAR server for the entire PHP community. There is no charge to host your PEAR projects on Pearfarm, and it couldn’t be easier to use:

  1. Create an account on Pearfarm.org. Run “pearfarm keygen” to generate a key and output your public key, then copy/paste it into your Pearfarm profile.
  2. Update your package’s channel to <username>.pearfarm.org and rebuild your package
  3. Run “pearfarm push” to publish your package.

Your package is now available to the world!
3) Aggregation of all major projects in the community

The PHP community is a very disconnected place. There’s the official PEAR repository, Zend Framework, PHP Classes, and hundreds if not thousands of other sites offering code. Without any centralized directory of software, it is difficult to find and compare software that addresses your needs.

While multiple projects serving the same goal is good for innovation and competition, there is also a lot of waste from people creating packages even though a good one already exists somewhere. The centralized directory nature of Pearfarm should help eliminate unproductive duplication of efforts and allow the community to redirect that energy into creating new and innovative projects.
Conclusion

By making it trivially easy to create, share and find PEAR packages, we know that the level of innovation, maturity, and productivity of the community will increase rapidly.

And when we say trivial, we mean trivial! You should be able to create a Pearfarm account, install Pearfarm, produce a package, and publish it on Pearfarm in less than 10-20 minutes.

We hope you’ll give it a try today.

http://www.pearfarm.org/

Enjoy!

The Pearfarm Team