Freenix
Freenix forum

Home » Community » General Info and Discussion » linux-libre-firmware
linux-libre-firmware [message #53] Fri, 06 September 2019 15:16 Go to next message
locutus is currently offline  locutus
Messages: 16
Registered: January 2018
Location: US
Junior Member
looking to build linux-libre-firmware, as its own package form
https://jxself.org/firmware/
Edited a script for the build but getting the following errors
line 2 $'\'r command not found
line 2 is a blank space
same for lines 23,25,30
then line 76 syntax error : unexpacted end of file

#!/bin/bash

# Copyright 2011, 2016, 2018  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Edited by locutus 09-2019

cd $(dirname $0) ; CWD=$(pwd)

PKGNAM=linux-libre-firmware
VERSION=${VERSION:-1.3.1}
ARCH=noarch
BUILD=${BUILD:-1}

# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
   echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
  exit 0
fi

TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PKGNAM
OUTPUT=${OUTPUT:-/tmp}

SOURCE="https://jxself.org/firmware/$PKGNAM-$VERSION.tar.lz"

# Download sorce tarball if still not present
if [ ! -e $CWD/$PKGNAM-$VERSION.tar.lz ]; then
wget -c $SOURCE
fi

mkdir -p $TMP $PKG $OUTPUT
rm -rf $PKG/*
rm -rf $TMP/tmp-$PKGNAM/*
rm -rf $OUTPUT/-$PKGNAM.log

cd $TMP/tmp-$PKGNAM
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1

chown -R root:root .

mkdir -p lib
mv linux-libre-firmware lib/firmware

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PKGNAM-$VERSION-$ARCH-$BUILD.txz 2>&1 | tee $OUTPUT/makepkg-$PKGNAM.log
cd $OUTPUT
md5sum $PKGNAM-$VERSION-$ARCH-$BUILD.txz > $PKGNAM-$VERSION-$ARCH-$BUILD.txz.md5
cd -
cat $PKG/install/slack-desc | grep "^$PRGNAM" > $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD.txt

##
umask ${_UMASK_}
Re: linux-libre-firmware [message #54 is a reply to message #53] Fri, 06 September 2019 17:23 Go to previous messageGo to next message
locutus is currently offline  locutus
Messages: 16
Registered: January 2018
Location: US
Junior Member
Seem to fixed it Smile
If it could be better please add
#!/bin/bash
# $Id: firmware.SlackBuild,v 1.3.1 2019/09/6 22:11:18 root Exp root $
# Copyright 2011, 2016, 2018  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Edited by locutus 09-2019
# -----------------------------------------------------------------------------------

cd $(dirname $0) ; CWD=$(pwd)

PKGNAM=linux-libre-firmware
VERSION=${VERSION:-1.3.1}
ARCH=noarch
BUILD=${BUILD:-1}

# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
   echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
  exit 0
fi

TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PKGNAM
OUTPUT=${OUTPUT:-/tmp}

wget -c https://jxself.org/firmware/$PKGNAM-$VERSION.tar.lz

mkdir -p $TMP $PKG $OUTPUT
rm -rf $PKG/*
rm -rf $TMP/tmp-$PKGNAM/*
rm -rf $OUTPUT/-$PKGNAM.log

cd $TMP
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1

chown -R root:root .

mkdir -p lib
mv linux-libre-firmware lib/firmware

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

# Build the package:
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PKGNAM-$VERSION-$ARCH-$BUILD.txz 2>&1 | tee $OUTPUT/makepkg-$PKGNAM.log
cd $OUTPUT
md5sum $PKGNAM-$VERSION-$ARCH-$BUILD.txz > $PKGNAM-$VERSION-$ARCH-$BUILD.txz.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD.txt

##
umask ${_UMASK_} 
Re: linux-libre-firmware [message #55 is a reply to message #53] Sat, 12 October 2019 17:57 Go to previous message
connie is currently offline  connie
Messages: 28
Registered: January 2017
Junior Member
Freenix Ninja
I was under impression that linux-libre already comes with all the useful free bits, including firmware, was I misinformed? I can't figure out by skimming that project what exactly is in there, and why isn't it in linux-libre to begin with?
Previous Topic: Upstream release dependency
Next Topic: Upstream ripples in the -current?
Goto Forum:
  


Current Time: Fri Oct 11 06:49:22 EDT 2024

Total time taken to generate the page: 0.01679 seconds