Welcome to phprpm Homepage


What is phprpm?

 phprpm is a basic extension to provide a couple of functions to process rpm files from php programs.

 With these functions, you can fetch the header information and file list of an rpm file from php.

 You can always get the latest version of the php_rpm from:

        http://cekirdek.uludag.org.tr/~meren/php_rpm/php_rpm-latest.tar.gz

 The latest version of phprpm is 0.1. You may see an example output of phprpm by clicking here.
   


What kind of functions does it provide?


 rpm_open("rpm_file_url");

	returns a file descriptor..

 rpm_close(fd);

	releases the fd source..

 rpm_getheader(fd, tag);

	returns the information of specified tag.. the complete tag list can be found in the php_rpm.h..

 rpm_getfilelist(fd);

	returns the file list of the cpio file..

 rpm_getfile(fd, file_name);

 	returns nothing yet :) but in the next release this function will be used to fetch a spesific file from the rpm.. btw, you already have the offsets and sizes of the files.

 rpm_getcpioname(fd);

	returns the temporary adress of the cpio file..
	


Ok. How can i install it?

 First you need an installed php-devel package to be able to use phpize command -which is the starter of the installation- and rpm libraries on your system; find php-devel and rpmlib packages of your own distro and install them if you haven't yet.

 Then type the following commands orderly in your php_rpm directory:

 ]$ phpize
 ]$ ./configure --with-rpm
 ]$ make

 Now, if you are lucky enough, you will find the 'rpm.so' file in the 'modules' directory. Copy the modules/rpm.so file to the /usr/lib/php/extensions or where ever your extension files reside.

 If you want to load this module automatically when apache starts, you need to create a loader ini file like

        /etc/php/99_php_rpm.ini (for mandrake)

 or

        /etc/php.d/php_rpm.ini (for fedora)

 that contains only the line "extension = rpm.so".

 If you don't want to create that ini file to load the extension automatically, you have to load the extension with ld(rpm.so); from your program to be able to use it.

 Don't forget to restart your web server.. Check the rpm-test.php, we know it is very ugly but it is a good start to understand functions.


I've found a bug in phprpm, what shall i do?

  Nice :) Feel free to mail us:
  
	Serdar Koylu, serdar~uludag.org.tr
	A. Murat Eren, meren~uludag.org.tr


I want more from phprpm!

  Send us your advices and feature requests.. Look at the previous answer..
  


I think phprpm is a great library!

  Dis iz yor greytnIs :)
  


http://www.uludag.org.tr/