> %clean
>
> %files
> %defattr(-,root,root)
> %doc NEWS
>
>
> But when running rpmbuild -dd pcore.spec , i get error:
What is -dd? Perhaps just a type mistake and you meant -bb. Correct?
> Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.32035
> + umask 022
> + cd /home/kahmed/rpmbuild/BUILD
> + cd pcore
Here the "builddir" was entered. The top directory of the extracted
source tarball.
One which platform did you do this build attempt?
It doesn't look like a recent Fedora or RHEL platform, because those
would empty'n'create the %buildroot directory. That is missing in what
you've quoted.
These three commands operated within the build directory, not in the
%buildroot. To operated in the buildroot, you need to use the prefix
%{buildroot} or $RPM_BUILD_ROOT with every path.
> + /usr/lib/rpm/find-debuginfo.sh /home/kahmed/rpmbuild/BUILD/pcore
> find: /var/tmp/pcore-0.1-Beta-root: No such file or directory
> error: Bad exit status from /var/tmp/rpm-tmp.32035 (%install)
This refers to the buildroot, the path specified in the "BuildRoot:" tag.
It doesn't exist for your build, because apparently you use a very old Fedora
where you need to do the following in the %install section:
You here want to use $RPM_BUILD_ROOT or %buildroot as explained earlier.
It is not helpful, if you go on with your own strange experiments instead
of following advice.
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
# and then continue to create files in that buildroot
# for example:
mkdir -p %{buildroot}%{_bindir}
> %files
> %defattr(-,root,root)
> %doc NEWS
>
> and i WAS able to get an rpm build with NEWS in the folder*
> /usr/share/doc/pcore-0.1/NEWS
That is something entirely different. The %doc statement as you use it
here for the NEWS file, copies the specified file from the builddir into
the buildroot's default docdir. That has nothing to do with your %install
section _except_ that the buildroot directory must exist (which is why
you need to create it for CentOS 5.8).
> Now i want to copy /pcore/obj/ggsnc/ggsnc to /usr/bin/
> How?
cp -p your LOCALPATH/TO/THE/FILE %{buildroot}%{_bindir}
where the local path refers to a file within the builddir.
> I have NO idea
Don't rush. Read replies more slowly and comment on specific quotes
instead of quoting everything at the bottom.
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging