Rpmbuild for PHP/Mysql App
Hi,
I'm looking for a way to use rpmbuild to make an rpm of a php/mysql app. Basically i'll have the php code that must go to the default apache directory, and sqldump that will be imported to a specified database,etc. Maybe check dependancies as well, i.e check that php,mysql and php-mysqli is installed. I'm not sure what i'll need in my spec file though. Firstly, is this possible, and if so do i need to make some kind of Makefile? What do i need to add in my prep and build sections of my spec file? I know i can probably write a shell script that will do everything, but i'll really prefer to have a .rpm file that will do all of this for me. Any suggestions? Thnx |
Quote:
Quote:
Quote:
|
Thanks, i'll have a bash at it, and if i don't get it right i'll come back.
|
Ok, i think i understand the procedure now for code that needs to be compiled. The prep does the untar, then you build it and finally install it. Under your %files part you then list the compiled code and this gets included into the generated .rpm file.
I'm a bit confused with how to handle php code that just needs to be copied over to the default apache dir,i.e no compiling is needed. A very trivial example : I have a tarball HelloWorld-0.0.1.tar.gz with one file Helloworld.php in it. (The tarball is in my BUILD dir and all of that) I want to generate an rpm so that when i run it, it copies over Helloworld.php to the default apache dir on the box it is installed on. What would i need in my spec file here? I have tried to put the cp commands in the spec files' install part, but it does not seem to work :(. I assume i'm missing the big picture... |
Saying "doesn't seem to work" is not like posting the actual error. Posting those may make it way easier to read and understand what's going on. That said: 0) under %install list the proper 'install' command to copy the file from your %source to the $RPM_BUILD_ROOT/path/to/apaches/docroot/ and 1) under %files list the /path/to/apaches/docroot/filename.
|
All times are GMT -5. The time now is 10:57 AM. |