On Mon, 2004-11-01 at 16:05 +0000, Daren Chandisingh wrote: > Essentially, the problem I have is that I can't work out > how to get my files placed where I want them. For example, > I have the following: > > BuildRoot: /usr/local/mydir > Prefix: /usr/local/mydir It looks like you are missing the idea of BuildRoot - more on that further down. > %files > /stuff/server/Myprocess > /stuff/server/Myfile > # shared libraries > /usr/lib/libStuff.so.1.0.0 > > This is OK, and the files get found and packaged. However, > upon installation they get dropped into /, rather than > /usr/local/mydir > > I've tried various values for BuildRoot, including "/" which > isn't allowed. OK, the buildroot is intended to be separate root directory that you install things under. So if your buildroot was /tmp and the file you were installing was /bin/ls then you would have:- BuildRoot: /tmp %install # add buildroot onto the paths - you also need # to make directories mkdir /tmp/bin install ls /tmp/bin/ls %files /bin/ls # NB no buildroot ------- Now to make this a little easier - especially because people make their buildroot values depend on the package name - you normally use the macro form of buildroot ( %{buildroot} ) or the shell variable ( $RPM_BUILDROOT ). So that previous fragment of a file is more likely to look like:- # Buildroot depends on package name/version BuildRoot: /var/tmp/%{name}-%{version}-%{release} %install # clean the buildroot in case there are files in there rm -rf %{buildroot} # create the directories needed mkdir %{buildroot}/bin # install the files install ls %{buildroot}/bin %files /bin/ls > Also, I can't figure out how to install a symlink at the > same time. What I need is for > /usr/local/mydir/usr/lib/libStuff.so to point at > /usr/local/mydir/usr/lib/libStuff.so.1.0.0, and although > I have ln commands in the %install section, this doesn't > appear to be the solution. This sort of thing is often done by ldconfig - although for those locations you will need to modify /etc/ld.so.conf or add a file into /etc/ld.so.conf.d to add the paths of your libraries. Alternatively you would have something like this in your %install section:- ln -s libStuff.so.1.0.0 %{buildroot}/usr/local/mydir/usr/lib/libStuff.so and have both the libstuff.so* files in your %files section. > > Any help is much appreciated, thanks. I'd be just as > grateful for a pointer to an up to date manual/web page > for rpmbuild that will enable me to work it out for myself. There is supposed to be stuff on http://www.rpm.org/ although it used to be very out of date - not sure what its like now... Nigel. -- [ Nigel Metheringham Nigel.Metheringham@xxxxxxxxxxxxxxxxxx ] [ - Comments in this message are my own and not ITO opinion/policy - ] _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list