source: npl/X/cairo/paredown.sh

Last change on this file was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 2.1 KB
Line 
1#!/bin/sh
2
3# Copyright 2013  Patrick J. Volkerding, Sebeka, MN, USA
4# All rights reserved.
5#
6# Redistribution and use of this script, with or without modification, is
7# permitted provided that the following conditions are met:
8#
9# 1. Redistributions of this script must retain the above copyright
10#    notice, this list of conditions and the following disclaimer.
11#
12#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
13#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
15#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
17#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
18#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
19#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
20#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
21#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23# Remove the reference PNG files from the cairo source tarball.
24# These are used only for build time testing, and cairo always fails
25# a large number of tests, making these files more or less useless to
26# the average end user.  If you really need them for some reason, you
27# can fetch the original tarball from cairographics.org.
28#
29# Removing these files reduces the size of the source tarball by 93%.
30
31PKGNAM=cairo
32VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
33
34if [ ! -r $PKGNAM-$VERSION.tar.xz ]; then
35  echo "$PKGNAM-$VERSION.tar.xz is not a cairo tarball.  Exiting."
36  exit 1
37fi
38
39touch -r $PKGNAM-$VERSION.tar.xz tmp-timestamp || exit 1
40
41rm -rf $PKGNAM-$VERSION
42tar xvf $PKGNAM-$VERSION.tar.xz || exit 1
43rm -f $PKGNAM-$VERSION/test/reference/*
44rm -f $PKGNAM-$VERSION.tar.xz
45tar cvf $PKGNAM-$VERSION.tar $PKGNAM-$VERSION
46touch -r tmp-timestamp $PKGNAM-$VERSION.tar
47xz -9 -v $PKGNAM-$VERSION.tar
48rm -rf $PKGNAM-$VERSION tmp-timestamp
49
50echo "Repacking of $PKGNAM-$VERSION.tar.xz complete."
51
Note: See TracBrowser for help on using the repository browser.