Hi Brandon,

On Wed, 2009-07-29 at 13:52 -0400, Brandon Barker wrote:
> Laca, this helps a lot!
> 
> I'm pretty close to putting my first spec together, aside from taking
> into account building 32bit and 64bit binaries, but I've seen some
> other posts and info that should help when I get there.

Looks like you like to dive in :)  Most people start with something
simple :)

> rm -f $RPM_BUILD_DIR/file.list.%{name}
> #find %{_tmppath}/%{name}-%{version}-build -type f | sed -e
> 's|%{_tmppath}/%{name}-%{version}-build||'| sed -e
> 's,^,\%attr(-\,root\,root) ,' >  $RPM_BUILD_DIR/file.list.%{name}

> %files -f ../file.list.%{name}

> pkgbuild: pkgbuild: File not found by glob:
> /var/tmp/pkgbuild-brandon/R-2.9.1-build/var/tmp/pkgbuild-brandon/R-2.9.1-build/usr/share/man/man1/R.1

The problem here is that the %files list should include the paths
of the binary package, not the temporary paths in the filesystem.
I.e. not /var/tmp/foo/usr/something but /usr/something.
(and typically, we use macros for directories like
        /usr/bin  -->    %{_bindir}
        /usr/lib  -->    %{_libdir}
        /usr/share  -->  %{_datadir}
but you don't need to do this in a dynamically generated file list)

The first find command, quoted above, has a rule for removing
%{_tmppath}/%{name}-%{version}-build from the path names, but
this line is commented out and the rest of the sed commands
don't have this rule.

Now, to make things more complicated, if you %include Solaris.inc
then the default of %{_basedir} is /usr which means all files in
the package are supposed to be under /usr.  You can change this
by adding

        SUNW_BaseDir: /

to your package tags.

Laca



Reply via email to