summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Pinot <ngc891@gmail.com>2014-10-26 17:22:21 +0900
committerJerome Pinot <ngc891@gmail.com>2014-10-26 17:22:21 +0900
commit00753cdd56d383a4a2f48c4577dc8b22b4a78efe (patch)
tree865404dfc5b28b396662e6e890ffc64f8acf585e
parent313b5616072e7b837f33882abc485cdc419c640e (diff)
Add Slackware packaging support files
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac4
-rw-r--r--packaging/Makefile.am2
-rw-r--r--packaging/slackware/Makefile.am4
-rw-r--r--packaging/slackware/doinst.sh3
-rwxr-xr-xpackaging/slackware/efractal.SlackBuild110
-rw-r--r--packaging/slackware/slack-desc19
-rw-r--r--packaging/slackware/slack-required5
8 files changed, 147 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index eb6dfc1..f8d9e7f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,7 @@ MAINTAINERCLEANFILES = \
20 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \ 20 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
21 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 21 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2
22 22
23SUBDIRS = data doc src 23SUBDIRS = data doc packaging src
24 24
25ACLOCAL_AMFLAGS = -I m4 25ACLOCAL_AMFLAGS = -I m4
26 26
diff --git a/configure.ac b/configure.ac
index 8ebdf20..64f5bed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1AC_INIT([efractal], m4_esyscmd([tr -d '\n' < VERSION]), [ngc891@gmail.com]) 1AC_INIT([efractal], [0.1], [ngc891@gmail.com])
2AC_PREREQ([2.69]) 2AC_PREREQ([2.69])
3AC_CONFIG_SRCDIR([config.h.in]) 3AC_CONFIG_SRCDIR([config.h.in])
4AC_CONFIG_HEADERS([config.h]) 4AC_CONFIG_HEADERS([config.h])
@@ -52,6 +52,8 @@ data/Makefile
52data/desktop/Makefile 52data/desktop/Makefile
53data/maps/Makefile 53data/maps/Makefile
54doc/Makefile 54doc/Makefile
55packaging/Makefile
56packaging/slackware/Makefile
55src/Makefile 57src/Makefile
56]) 58])
57AC_OUTPUT 59AC_OUTPUT
diff --git a/packaging/Makefile.am b/packaging/Makefile.am
new file mode 100644
index 0000000..b23a7f4
--- /dev/null
+++ b/packaging/Makefile.am
@@ -0,0 +1,2 @@
1MAINTAINERCLEANFILES = Makefile.in
2SUBDIRS = slackware
diff --git a/packaging/slackware/Makefile.am b/packaging/slackware/Makefile.am
new file mode 100644
index 0000000..b499736
--- /dev/null
+++ b/packaging/slackware/Makefile.am
@@ -0,0 +1,4 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = doinst.sh efractal.SlackBuild slack-desc slack-required
4
diff --git a/packaging/slackware/doinst.sh b/packaging/slackware/doinst.sh
new file mode 100644
index 0000000..5fb2893
--- /dev/null
+++ b/packaging/slackware/doinst.sh
@@ -0,0 +1,3 @@
1if [ -x /usr/bin/update-desktop-database ]; then
2 /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
3fi
diff --git a/packaging/slackware/efractal.SlackBuild b/packaging/slackware/efractal.SlackBuild
new file mode 100755
index 0000000..022bcbf
--- /dev/null
+++ b/packaging/slackware/efractal.SlackBuild
@@ -0,0 +1,110 @@
1#!/bin/bash
2#
3# Begin efractal.SlackBuild
4#
5# Copyright (C) 2012-2014 Jerome Pinot <ngc891@gmail.com>
6# All rights reserved.
7#
8# Redistribution and use of this script, with or without modification, is
9# permitted provided that the following conditions are met:
10#
11# 1. Redistributions of this script must retain the above copyright
12# notice, this list of conditions and the following disclaimer.
13#
14# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
15# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
17# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25NAME=efractal
26BUILD=${BUILD:-1jp}
27CWD=$(pwd)
28TMP=${TMP:-/tmp}
29PKG=${TMP}/package-${NAME}
30
31# First check if we are in the right folder
32if [ -f ./${NAME}.SlackBuild ]; then
33 echo 'Found SlackBuild'
34else
35 echo 'Error: You must run this script from the packaging/slackware sub-folder!'
36 exit 1
37fi
38
39# Get the version number from configure.ac
40if [ -f ../../configure.ac ];then
41 VERSION=`grep "AC_INIT" ../../configure.ac | cut -d' ' -f2 | sed -e 's/\[//' -e 's/\],//'`
42else
43 echo "Error: can't find configure.ac!"
44 exit 2
45fi
46
47# if ${ARCH} is unset, we have to guess it with uname
48if [ -z "${ARCH}" ]; then
49 case "$(uname -m)" in
50 i?86) export ARCH=i486 ;;
51 arm*) export ARCH=arm ;;
52 *) export ARCH=$(uname -m) ;;
53 esac
54fi
55
56# Set generic flags for gcc
57SCFLAGS='-O2'
58if [ "${ARCH}" = "i486" ]; then
59 SCFLAGS="${SCFLAGS} -march=i486 -mtune=i686"
60 LIBDIR="/usr/lib"
61elif [ "${ARCH}" = "x86_64" ]; then
62 SCFLAGS="${SCFLAGS} -fPIC"
63 LIBDIR="/usr/lib64"
64elif [ "${ARCH}" = "arm" ]; then
65 SCFLAGS="${SCFLAGS} -march=armv4 -mtune=xscale"
66 LIBDIR="/usr/lib"
67fi
68
69# Creating directories
70if [ ! -d ${TMP} ]; then
71 mkdir -p ${TMP}
72fi
73rm -rf ${PKG}
74mkdir -p ${PKG}
75
76# Configuring
77cd ../..
78if [ -f Makefile ]; then
79 make clean
80fi
81
82CFLAGS="${SCFLAGS}" \
83 ./configure \
84 --prefix=/usr \
85 --libdir=${LIBDIR} \
86 --mandir=/usr/man \
87 --docdir=/usr/doc/${NAME}-${VERSION}
88
89# Building
90make
91
92# Installing
93make DESTDIR=${PKG} install
94
95# Cleaning
96cd ${PKG}
97gzip -9 usr/man/man1/${NAME}.1
98
99find ${PKG} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
100find ${PKG} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
101
102# Building the package
103mkdir install
104install -m644 ${CWD}/doinst.sh install/
105install -m644 ${CWD}/slack-desc install/
106install -m644 ${CWD}/slack-required install/
107makepkg -l y -c n ${CWD}/${NAME}-${VERSION}-${ARCH}-${BUILD}.txz
108rm -rf ${PKG}
109
110# End efractal.SlackBuild
diff --git a/packaging/slackware/slack-desc b/packaging/slackware/slack-desc
new file mode 100644
index 0000000..8f41989
--- /dev/null
+++ b/packaging/slackware/slack-desc
@@ -0,0 +1,19 @@
1# HOW TO EDIT THIS FILE:
2# The "handy ruler" below makes it easier to edit a package description. Line
3# up the first '|' above the ':' following the base package name, and the '|'
4# on the right side marks the last column you can put a character in. You must
5# make exactly 11 lines for the formatting to be correct. It's also
6# customary to leave one space after the ':'.
7
8 |-----handy-ruler------------------------------------------------------|
9efractal: eFractal is an EFL fractal generator
10efractal:
11efractal:
12efractal:
13efractal:
14efractal:
15efractal:
16efractal:
17efractal:
18efractal:
19efractal:
diff --git a/packaging/slackware/slack-required b/packaging/slackware/slack-required
new file mode 100644
index 0000000..c044151
--- /dev/null
+++ b/packaging/slackware/slack-required
@@ -0,0 +1,5 @@
1eina >= 1.8.0
2evas >= 1.8.0
3ecore >= 1.8.0
4ecore-evas >= 1.8.0
5ecore-file >= 1.8.0