How I can generate a RPM that copy 3 files into 3 diferent folders?
For example:
I have: Mongo-watcher, config.properties and watcher.jar
Mongo-watcher has to be placed under: /etc/init.d/
Config.properties has to be placed under: /etc/living/mongo-watcher/
And finally watcher.jar has to be under: /usr/local/mongo-watcher/
I've tryed the following:
mkdir -p ~/rpmbuild/{RPMS,SRPMS,BUILD,SOURCES,SPECS,tmp}
cd ~/rpmbuild
mkdir mongo-watcher-1.0
mkdir -p mongo-watcher-1.0/etc/init.d
mkdir -p mongo-watcher-1.0/etc/living/mongo-watcher
mkdir -p mongo-watcher-1.0/usr/local/mongo-watcher
install -m 744 mongo-watcher /mongo-watcher-1.0/etc/init.d/
install -m 744 config.properties /mongo-watcher-1.0/etc/living/mongo-watcher/
install -m 744 watcher.jar /mongo-watcher-1.0/usr/local/mongo-watcher/
tar -zcvf mongo-watcher-1.0.tar.gz mongo-watcher-1.0/
mv mongo-watcher-1.0.tar.gz ./SOURCES
After that I don't know what I have to place on ./SPECS folder and how to do it for generating the rpm package that installs the following files under that folders.