source: projects/vine-rpm-helper/trunk/mkrpmfiles.in @ 4892

Revision 4892, 512 bytes checked in by yasumichi, 12 years ago (diff)

configure によってスクリプトを生成するように変更

Line 
1#!/bin/sh
2
3# check arguments
4if [ -z "$*" ]; then
5        echo "Usage: `basename $0` name.spec"
6        exit 1
7fi
8
9SPEC=$1
10
11BUILDROOT=`rpm -E '%{_tmppath}'`/`basename $0`-root
12
13# Remove BUILDROOT
14if [ -e $BUILDROOT ]; then
15        rm -rf $BUILDROOT
16fi
17
18# Output files section
19if rpmbuild -bi --buildroot=$BUILDROOT $SPEC >/dev/null 2>&1 ;then
20        echo '%files'
21        echo '%defattr(-,root,root)'
22        cd $BUILDROOT && find . -type f | sed -e 's/^\.//'
23        #cd $BUILDROOT && find . -type f | sed -e 's/^\.//' | sed -e 's/\/[^\/]*$/\/\*/' | uniq
24fi
Note: See TracBrowser for help on using the repository browser.