David Thomas Baker » PHP » Creating RPMs - Distributing PHP Code

Distributing PHP code with RPM's

Update:  thanks for the del.icio.us link - I have posted a helper script I created for building RPM's - could be easily modified to work in your situation - click here

# cd /usr/src/redhat/SPECS/
# vi your_app-1-1.spec
Summary: PHP code for blah blah
Name: your_app
Version: 1
Release: 1
Group: Applications/Internet
License: commercial
Source: your_app-1-1.tar.gz
BuildRoot: /var/tmp/%{name}-buildroot

%description
Some
Description
Here

%prep
%setup -q

%build

%install
cp -rvf $RPM_BUILD_DIR/your_app-1 $RPM_BUILD_ROOT

%clean
if( [ $RPM_BUILD_ROOT != "/" ] ); then rm -rf $RPM_BUILD_ROOT; fi;

%files
/.

# cd /usr/src/redhat/SOURCES/
# mkdir -p your_app-1/var/www/your_app/
# cp -rvf /var/www/your_app your_app-1/var/www/your_app/
# tar -cf your_app-1-1.tar your_app-1
# gzip your_app.tar
# rpmbuild -ba /usr/src/redhat/SPECS/your_app-1-1.spec
# ls /usr/src/redhat/RPMS/i386/
your_app-1-1.rpm
# rpm -i usr/src/redhat/RPMS/i386/your_app-1-1.rpm
(should install your source code into /var/www/your_app)
# rpm -e your_app-1
(should remove your code from /var/www/your_app)

woot!
Posted by David Baker in: PHP | Linux |
Tags: rpm |
Perm Link: link
Some ads...

Search My Site

Featured Projects

Collector Comics is THE place to buy, sell, and research comics online. Launching soon.
Launch » Screenshot »
Webitor is a kick-ass easy to use, easy to extend, non-database driven Content Management System. Version 2 with reseller plan coming soon.
Launch » Version 1 »
GC Lounge is my own pet social network and test bed for social related code. Made by locals for locals.
Launch »
GG has indexed over half a million recent Trade Mark applications. This revolutionary tool is extremely valuable for industry experts.
Launch »
GCWiFi is the hub for techies interested in joining a ad-hoc wireless mesh spread across the Gold Coast
Launch »
Web based financial client management system
Launch »
OS Commerce modules and template modification
Launch »
View More Projects »

Daves Friends

BlueTeddy
WebSpark
GC Designer Forum
IPWealth Trademarks
Cheap Websites
Bonsai Shop
Webitor CMS Resellers
Hayley Crook
David Novakovic
Ben Novakovic
Richard Morwood
Gold Coast Linux
Aussie Click
CMS Website Design
Inspire Tuition
Gold Coast Music Network and Gold Coast Gig Guide

Chat with Dave

Powered by...

In the works

Webitor - Easy to use Content Management System with Shop, Newsletter, and Reseller plan