Mail archive
alpine-devel

[alpine-devel] [PATCH] testing/emelfm2: new aport

From: AmatCoder <amatcoder_at_gmail.com>
Date: Wed, 12 Nov 2014 17:36:48 +0000

---
 testing/emelfm2/01-avoid_fstab.patch     | 30 +++++++++++++++++
 testing/emelfm2/02-define_ALLPERMS.patch | 13 ++++++++
 testing/emelfm2/APKBUILD                 | 55 ++++++++++++++++++++++++++++++++
 3 files changed, 98 insertions(+)
 create mode 100644 testing/emelfm2/01-avoid_fstab.patch
 create mode 100644 testing/emelfm2/02-define_ALLPERMS.patch
 create mode 100644 testing/emelfm2/APKBUILD
diff --git a/testing/emelfm2/01-avoid_fstab.patch b/testing/emelfm2/01-avoid_fstab.patch
new file mode 100644
index 0000000..1b9d0d2
--- /dev/null
+++ b/testing/emelfm2/01-avoid_fstab.patch
_at_@ -0,0 +1,30 @@
+--- emelfm2-0.9.1-origin/src/filesystem/e2_fs_mount.c
++++ emelfm2-0.9.1/src/filesystem/e2_fs_mount.c
+_at_@ -46,7 +46,7 @@
+ #endif
+ //other exclusions go here ...
+ 
+-# if defined(__linux__)
++# if defined(__GLIBC__)
+ #  include <mntent.h>
+ #  include <fstab.h>
+ 
+_at_@ -62,7 +62,9 @@
+ 
+ # else
+ #  include <mntent.h>
++#  if defined(__GLIBC__)
+ #  include <fstab.h>
++#  endif
+ 
+ /*Some systems use statfs() to provide information about mounted
+ file systems, other systems use statvfs(). The header files used with
+_at_@ -1020,7 +1022,7 @@
+ {
+ 	GList *fstab_list = NULL;
+ 	//CHECKME lock data file while accessing it ??
+-#if defined(__E2BSD__) || defined(__linux__)
++#if defined(__E2BSD__) || defined(__GLIBC__)
+     struct fstab *fs;
+ 
+ 	if (!setfsent ())
diff --git a/testing/emelfm2/02-define_ALLPERMS.patch b/testing/emelfm2/02-define_ALLPERMS.patch
new file mode 100644
index 0000000..a5e9e4f
--- /dev/null
+++ b/testing/emelfm2/02-define_ALLPERMS.patch
_at_@ -0,0 +1,13 @@
+--- emelfm2-0.9.1-origin/src/filesystem/e2_fs.h
++++ emelfm2-0.9.1/src/filesystem/e2_fs.h
+_at_@ -25,6 +25,10 @@
+ #ifndef __E2_FS_H__
+ #define __E2_FS_H__
+ 
++#ifndef ALLPERMS
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
++#endif
++
+ #include "emelfm2.h"
+ #include <unistd.h>
+ #include <dirent.h>
diff --git a/testing/emelfm2/APKBUILD b/testing/emelfm2/APKBUILD
new file mode 100644
index 0000000..d8078a5
--- /dev/null
+++ b/testing/emelfm2/APKBUILD
_at_@ -0,0 +1,55 @@
+# Contributor: August Klein <amatcoder_at_gmail.com>
+# Maintainer: August Klein <amatcoder_at_gmail.com>
+pkgname=emelfm2
+pkgver=0.9.1
+pkgrel=0
+pkgdesc="A file manager for UNIX-like operating systems"
+url="http://emelfm2.net"
+arch="all"
+license="GPL3"
+depends=""
+depends_dev="file-dev gtk+2.0-dev"
+makedepends="$depends_dev coreutils"
+install=""
+subpackages="$pkgname-lang $pkgname-doc"
+source="http://emelfm2.net/rel/$pkgname-$pkgver.tar.bz2
+	01-avoid_fstab.patch
+	02-define_ALLPERMS.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	make PREFIX=/usr || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make PREFIX="${pkgdir}/usr" install install_i18n || return 1
+
+	install -m 755 "${pkgdir}/usr/share/pixmaps/emelfm2/emelfm2_48.png" \
+	"${pkgdir}/usr/share/pixmaps/emelfm2.png"
+
+	sed -e '/Icon=/ s^emelfm2/emelfm2_48.png^emelfm2.png^' \
+	-e '/Categories=/ s^;$^;Application;Utility;^' \
+	-i "${pkgdir}/usr/share/applications/emelfm2.desktop"
+}
+
+md5sums="ea83b73d76edf1cea5bce00ec630af6f  emelfm2-0.9.1.tar.bz2
+4f307b7096291d1e6a14a29a7d6978bd  01-avoid_fstab.patch
+9bb3d555f792afed972b47faec9863f3  02-define_ALLPERMS.patch"
+sha256sums="bfb94ff4e40c0a9c0d2a6aeb0efa22e177accbf6abd3096226d93daecd23642f  emelfm2-0.9.1.tar.bz2
+395ba0ea1140d229e343df8407433ab98de185708ec21c6502399dcfe7a310e4  01-avoid_fstab.patch
+a0e597764b9d2842ecd2ea087797509c15dbda937e3b3116c4533e8ac3e45947  02-define_ALLPERMS.patch"
+sha512sums="bd3a1ad2338c80d6824a2a84736470ecfa7e93f455cc8e3243944833807fe9b3544e2fea6bd6ccbddaf0188ad89ce616ed146271f6ffabec80f5dfb2f1ad6f57  emelfm2-0.9.1.tar.bz2
+5b156e994eb62f034e8bb246f42633858fd0e3009a4997c54a7ba347b230ab80d2c307b0af961e174d149fc8878104c0350f7ded41d05424a6b11f9011ef6b17  01-avoid_fstab.patch
+a3d860e9134654e61038cb13c8dc55c3da3885a6d42229f1976a0848a2570e62230c529764aa82620e3847c2093a8c5f36d1695b500b3b98517705b01acf26d6  02-define_ALLPERMS.patch"
-- 
2.1.3
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Wed Nov 12 2014 - 17:36:48 GMT