cleaning,fixing

This commit is contained in:
Gwenhael Le Moine 2011-03-09 10:30:42 +07:00
parent 95fa6c39ce
commit 2af4fd77df

View file

@ -26,39 +26,40 @@ mkdir -p $TMP/
tar -C $TMP -xf $CWD/${PRGNAM}_linux_$VERSION.tar.gz
mv $TMP/${PRGNAM}_linux_$VERSION $TMP/$PRGNAM-$VERSION
( cd $TMP/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION
# Preparation
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# Building
make
make
# Installation
mkdir -p $PKG/lib/modules/$(uname -r)/kernel/drivers/net/wireless/
find ./HAL/ -name \*.ko -exec cp {} $PKG/lib/modules/$(uname -r)/kernel/drivers/net/wireless/ \;
mkdir -p $PKG/lib/modules/$(uname -r)/kernel/drivers/net/wireless/
find ./HAL/ -name \*.ko -exec cp {} $PKG/lib/modules/$(uname -r)/kernel/drivers/net/wireless/ \;
mkdir -p $PKG/lib/
cp -R firmware $PKG/lib/
mkdir -p $PKG/lib/
cp -R firmware $PKG/lib/
mkdir -p $PKG/usr/doc/$PRGNAM
cp readme.txt release_note $PKG/usr/doc/$PRGNAM
mv $PKG/lib/firmware/*/Realtek-Firmware-License.txt $PKG/usr/doc/$PRGNAM
)
mkdir -p $PKG/usr/doc/$PRGNAM
cp readme.txt release_note $PKG/usr/doc/$PRGNAM
mv $PKG/lib/firmware/*/Realtek-Firmware-License.txt $PKG/usr/doc/$PRGNAM
( cd $PKG
PRGNAM=$PRGNAM-$(uname -r | tr - _)
cd $PKG
# Cleaning
chown -R root:root .
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chown -R root:root .
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
# Packaging
mkdir install
cat <<EOF > install/doinst.sh
mkdir install
cat <<EOF > install/doinst.sh
#!/bin/sh
grep r8192_pci.ko /lib/modules/\$(uname -r)/modules.dep && rm -fr /lib/modules/\$(uname -r)/kernel/drivers/staging/rtl8192e/ || echo > /dev/null
@ -68,7 +69,7 @@ rm -f /etc/acpi/events/RadioPower.sh
depmod -a
EOF
cat <<EOF > install/slack-desc
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (RTL8192SE Linux driver)
$PRGNAM:
$PRGNAM: This driver supports RealTek rtl8192SE PCI Wireless LAN NIC
@ -82,6 +83,4 @@ $PRGNAM: ftp://WebUser:pGL7E6v@208.70.202.219/cn/wlan/
$PRGNAM: ftp://WebUser:pGL7E6v@218.210.127.132/cn/wlan/
EOF
makepkg -l y -c n $OUTPUT/$PRGNAM-$(uname -r | tr - _)-$(echo $VERSION | tr -d '-')-$ARCH-$BUILD$TAG.txz
)
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr -d '-')-$ARCH-$BUILD$TAG.txz