summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrien Nader <adrien@notk.org>2014-12-09 10:09:11 +0100
committerAdrien Nader <adrien@notk.org>2014-12-09 10:09:11 +0100
commit2afccdd5744068ad5e6b1802fcb13b3d84903f63 (patch)
tree92c8352ace6a0f0d6fdb749865ec340545ff81db
parentcb6939fe97fbbc6d2ba4638e1b68552dab847b2e (diff)
libdvdnav: initial port.
-rw-r--r--libraries/libdvdnav/libdvdnav.SlackBuild68
-rw-r--r--libraries/libdvdnav/libdvdnav.yypkg.script6
2 files changed, 33 insertions, 41 deletions
diff --git a/libraries/libdvdnav/libdvdnav.SlackBuild b/libraries/libdvdnav/libdvdnav.SlackBuild
index 4adf5b8ea7..f73127bbb8 100644
--- a/libraries/libdvdnav/libdvdnav.SlackBuild
+++ b/libraries/libdvdnav/libdvdnav.SlackBuild
@@ -23,37 +23,15 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=libdvdnav
-VERSION=4.2.0
+VERSION=${VERSION:-4.2.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
@@ -69,28 +47,36 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-./autogen.sh
+sed -i '/libdvdnav_la_LDFLAGS = \\$/ a -no-undefined \\' Makefile.in
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="-O2" \
+CXXFLAGS="-O2" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
+ --prefix=/${PREFIX} \
+ --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/${PREFIX}/etc \
+ --localstatedir=/${PREFIX}/var \
--disable-static \
- --build=$ARCH-slackware-linux
+ --host=${HOST_TRIPLET} \
+ --build=${BUILD_TRIPLET}
-make
-make install-strip DESTDIR=$PKG
+make -j4
+make install DESTDIR=$PKG
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS ChangeLog COPYING DEVELOPMENT-POLICY.txt \
- INSTALL NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+mkdir -p $PKG/${PREFIX}/doc/$PRGNAM-$VERSION
+cp -a AUTHORS ChangeLog COPYING README TODO \
+ $PKG/${PREFIX}/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/${PREFIX}/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+find $PKG | xargs file | egrep "executable|shared object" \
+ | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \
+ | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+cat ${CWD}/$PRGNAM.yypkg.script | sed \
+ -e "s/%{PKG}/$PRGNAM/" \
+ -e "s/%{HST}/${HOST_TRIPLET}/" \
+ -e "s/%{TGT}//" \
+ -e "s/%{VER}/${VERSION}/" \
+ -e "s/%{BUILD}/${BUILD}/" \
+ -e "s/%{DESCR}/${DESCR:-"No description"}/" \
+ | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}"
diff --git a/libraries/libdvdnav/libdvdnav.yypkg.script b/libraries/libdvdnav/libdvdnav.yypkg.script
new file mode 100644
index 0000000000..96b5f52526
--- /dev/null
+++ b/libraries/libdvdnav/libdvdnav.yypkg.script
@@ -0,0 +1,6 @@
+(((name %{PKG}) (size_expanded (TB 42))
+ (version (%{VER} %{BUILD}))
+ (packager_email adrien@notk.org) (packager_name "Adrien Nader")
+ (description "%{DESCR}") (host %{HST}) (target (%{TGT})) (predicates ())
+ (comments ()))
+ () ())