On Tue, Nov 18, 2003, Tres Seaver wrote:

> I have banged around a bit further on the OpenPKG specfile I wrote for
> Zope, but still can't figure out how to use %{l_rpmtool} to get the
> ownership / attributes set properly for the "data" directory. [...]
> 
Tres,
i tried the following spec and results look good and as expected.

    ##
    ##  test.spec -- OpenPKG RPM Specification
    ##

    #   package information
    Name:         test
    Summary:      Test
    URL:          http://www.openpkg.org/
    Vendor:       Dr. John Doe
    Packager:     The OpenPKG Project
    Distribution: OpenPKG [JUNK]
    Group:        Misc
    License:      GPL
    Version:      0.8.15
    Release:      20031119

    #   build information
    Prefix:       %{l_prefix}
    BuildRoot:    %{l_buildroot}
    BuildPreReq:  OpenPKG, openpkg >= 20030718
    PreReq:       OpenPKG, openpkg >= 20030718
    AutoReq:      no
    AutoReqProv:  no

    %description
        Test

    %prep

    %build

    %install
        rm -rf $RPM_BUILD_ROOT
        %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/test/var
        %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
            '%attr(700,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/test/var'

    %files -f files

    %clean
        rm -rf $RPM_BUILD_ROOT

$ rpm -ba test.spec
$ su -
# rpm -Uvh .../test-0.8.15-20031119.ix86-freebsd4.9-cw.rpm
$ exit
$ rpm2cpio <.../test-0.8.15-20031119.ix86-freebsd4.9-cw.rpm | cpio -itv
drwxr-xr-x   3 cw       cw              0 Nov 19 16:05 ./cw/var/test
drwx------   2 cw-r     cw-r            0 Nov 19 16:05 ./cw/var/test/var
$ ls -ld /cw/var/test/var
drwx------   2 cw-r     cw-r          512 Nov 19 16:02 /cw/var/test/var

--
[EMAIL PROTECTED], Cable & Wireless
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   [EMAIL PROTECTED]

Reply via email to