LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Creating an installable RPM (https://www.linuxquestions.org/questions/linux-general-1/creating-an-installable-rpm-360656/)

smart_sagittari 09-06-2005 05:26 AM

Creating an installable RPM
 
I have never created an RPM file [never felt the need to :D]. However, I now have this folder structure of some directories which I need to convert into an RPM so that it can be installed in some other machine.

More clearly, I have the following directory structure within my "source" directory [the one to be packaged].

0/
1/
2/
3/
4/
5/
6/
7/
8/
9/

Each of them is a directory with depth "n" [constant across all the directories]. I need to create an RPM such that it will install this directory structure into some path in a different machine.

I would appreciate a simple step by step guide for this.

Thanks

Jongi 09-06-2005 06:12 AM

Couldn't you just compress the "source" directory in a way that keeps the directory structure?

smart_sagittari 09-06-2005 08:22 AM

I will tell you what I have. I have the entire source directory in a tar format. Problem is I have never ever created an RPM. I was going through some pages, but didnt really understand much. There was some mention about creating a spec file. If you can kindly help me with that, I would be really grateful.

All I need is that the directory structure that I have [in store.tar] needs to be copied to a particular location on using the rpm. I need to create an RPM for this.

Please help!

crAckZ 09-06-2005 09:40 AM

http://qa.mandriva.com/twiki/bin/view/Main/RpmHowTo

smart_sagittari 09-08-2005 02:31 AM

Thanks for the link. I have now been able to create an RPM which does what I wanted to.

I have a new problem though. When I want to uninstall this particular RPM, giving a rpm -e <packagename> removes only the files under %files section, but doesnt remove the directory structure. What can I do about it?

crAckZ 09-08-2005 11:28 AM

this link should help
www-128.ibm.com/developerworks/library/l-rpm3/

this will tell you how to add a post script to your rpm. i am assuming that in this post script you can tell it to remove the created directories.


All times are GMT -5. The time now is 09:57 PM.