aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2010-12-22 15:47:38 -0600
committerWilliam Pitcock <nenolod@dereferenced.org>2010-12-22 15:47:38 -0600
commite5f936130acb7e29bc68ba1cb346e7f2ff16efd8 (patch)
treed8555ce5e822f6a4431631b8f776370cede13b89
parent477768c1998ec4898ce94019eeba49510502f145 (diff)
downloadalpine_aports-e5f936130acb7e29bc68ba1cb346e7f2ff16efd8.tar.bz2
alpine_aports-e5f936130acb7e29bc68ba1cb346e7f2ff16efd8.tar.xz
alpine_aports-e5f936130acb7e29bc68ba1cb346e7f2ff16efd8.zip
testing/lxdm: new aport.
-rw-r--r--testing/lxdm/APKBUILD55
-rw-r--r--testing/lxdm/lxdm-execinfo.patch47
-rw-r--r--testing/lxdm/lxdm-nopam.patch18
-rwxr-xr-xtesting/lxdm/lxdm.initd18
4 files changed, 138 insertions, 0 deletions
diff --git a/testing/lxdm/APKBUILD b/testing/lxdm/APKBUILD
new file mode 100644
index 0000000000..de51ddad73
--- /dev/null
+++ b/testing/lxdm/APKBUILD
@@ -0,0 +1,55 @@
1# Contributor: William Pitcock <nenolod@dereferenced.org>
2# Maintainer: William Pitcock <nenolod@dereferenced.org>
3pkgname=lxdm
4pkgver=0.3.0
5pkgrel=0
6pkgdesc="LXDE desktop login manager"
7url="http://wiki.lxde.org/en/LXDM"
8license="GPL"
9depends=
10makedepends="autoconf automake gtk+-dev consolekit-dev"
11install=
12source="http://downloads.sourceforge.net/lxde/$pkgname-$pkgver.tar.gz
13 lxdm.initd
14 lxdm-execinfo.patch
15 lxdm-nopam.patch"
16arch="all"
17
18_builddir="$srcdir"/$pkgname-$pkgver
19
20prepare() {
21 cd "$_builddir"
22
23 for i in $source; do
24 case $i in
25 *.patch)
26 msg "Applying $i..."
27 patch -s -p1 -N -i "$srcdir"/$i || return 1
28 ;;
29 esac
30 done
31
32 autoreconf
33}
34
35build() {
36 cd "$_builddir"
37 ./configure --prefix=/usr \
38 --sysconfdir=/etc \
39 --mandir=/usr/share/man \
40 --infodir=/usr/share/info \
41 --without-pam
42 make || return 1
43}
44
45package() {
46 cd "$_builddir"
47 make DESTDIR="$pkgdir" install
48
49 install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
50}
51
52md5sums="1d0688e088edab7c3c563263eb2f9654 lxdm-0.3.0.tar.gz
5327f8ef5c16ae1234365ab318e2c9001c lxdm.initd
54045da38f5bb183ccacc489ea7e50e927 lxdm-execinfo.patch
550d44e8cd97894fd680e3f09e680c3481 lxdm-nopam.patch"
diff --git a/testing/lxdm/lxdm-execinfo.patch b/testing/lxdm/lxdm-execinfo.patch
new file mode 100644
index 0000000000..b81ef2fc84
--- /dev/null
+++ b/testing/lxdm/lxdm-execinfo.patch
@@ -0,0 +1,47 @@
1--- lxdm-0.3.0/configure.ac
2+++ lxdm-0.3.0.mod/configure.ac
3@@ -23,7 +23,7 @@
4
5 # Checks for header files.
6 AC_PATH_X
7-AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h])
8+AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h execinfo.h])
9
10 # Checks for typedefs, structures, and compiler characteristics.
11 AC_TYPE_PID_T
12Only in lxdm-0.3.0: data/LoginReady
13Only in lxdm-0.3.0: data/PostLogin
14Only in lxdm-0.3.0: data/PostLogout
15Only in lxdm-0.3.0: data/PreLogin
16Only in lxdm-0.3.0: data/PreReboot
17Only in lxdm-0.3.0: data/PreShutdown
18--- lxdm-0.3.0/src/lxdm.c
19+++ lxdm-0.3.0.mod/src/lxdm.c
20@@ -51,7 +51,9 @@
21 #include <sys/ioctl.h>
22 #include <sys/stat.h>
23
24+#ifdef HAVE_EXECINFO_H
25 #include <execinfo.h>
26+#endif
27
28 #include <utmp.h>
29
30@@ -1480,6 +1482,7 @@
31
32 static void log_sigsegv(void)
33 {
34+#ifdef HAVE_EXECINFO_H
35 void *array[40];
36 size_t size;
37 char **bt_strs;
38@@ -1492,6 +1495,9 @@
39 fprintf(stderr, "%s\n", bt_strs[i]);
40
41 free(bt_strs);
42+#else
43+ fprintf(stderr, "backtrace is unavailable\n");
44+#endif
45 }
46
47 static void sigsegv_handler(int sig)
diff --git a/testing/lxdm/lxdm-nopam.patch b/testing/lxdm/lxdm-nopam.patch
new file mode 100644
index 0000000000..86c808fcb6
--- /dev/null
+++ b/testing/lxdm/lxdm-nopam.patch
@@ -0,0 +1,18 @@
1--- lxdm-0.3.0/src/lxdm.c
2+++ lxdm-0.3.0.mod/src/lxdm.c
3@@ -152,6 +152,7 @@
4 while( waitpid(-1, 0, WNOHANG) > 0 ) ;
5 }
6
7+#if HAVE_LIBPAM
8 static void close_pam_session(pam_handle_t *pamh)
9 {
10 int err;
11@@ -161,6 +162,7 @@
12 pam_end(pamh, err);
13 pamh = NULL;
14 }
15+#endif
16
17 static LXSession *lxsession_find_greeter(void)
18 {
diff --git a/testing/lxdm/lxdm.initd b/testing/lxdm/lxdm.initd
new file mode 100755
index 0000000000..274c4afe9b
--- /dev/null
+++ b/testing/lxdm/lxdm.initd
@@ -0,0 +1,18 @@
1#!/sbin/runscript
2
3depends() {
4 needs localmount
5}
6
7start() {
8 ebegin "Starting lxdm"
9 start-stop-daemon --start --quiet --exec /usr/bin/lxdm -- -d
10 eend $?
11}
12
13stop() {
14 ebegin "Stopping lxdm"
15 start-stop-daemon --stop --quiet --exec /usr/bin/lxdm
16 eend $?
17}
18