diff options
author | Oyvind Repvik <nail@nslu2-linux.org> | 2007-03-17 01:28:56 +0000 |
---|---|---|
committer | Oyvind Repvik <nail@nslu2-linux.org> | 2007-03-17 01:28:56 +0000 |
commit | 8c6732f85309fde518a9d6d04bb7b6f0acafd40d (patch) | |
tree | 71d720d8a37bfc41b5fbdb4d926cdee9cae394be | |
parent | cefc55b39a8ab57a6d2441fc686e51af9393d15d (diff) |
netatalk: Add netatalk package, provided by
timtimred. Thanks ;-)
-rw-r--r-- | packages/netatalk/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/netatalk/files/.mtn2git_empty | 0 | ||||
-rwxr-xr-x | packages/netatalk/files/init | 111 | ||||
-rw-r--r-- | packages/netatalk/netatalk-2.0.3/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-db43.patch | 32 | ||||
-rw-r--r-- | packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-newerdb.patch | 28 | ||||
-rw-r--r-- | packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-setXid.patch | 14 | ||||
-rw-r--r-- | packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-xfs.patch | 22 | ||||
-rw-r--r-- | packages/netatalk/netatalk_2.0.3.bb | 39 |
9 files changed, 246 insertions, 0 deletions
diff --git a/packages/netatalk/.mtn2git_empty b/packages/netatalk/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/netatalk/.mtn2git_empty diff --git a/packages/netatalk/files/.mtn2git_empty b/packages/netatalk/files/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/netatalk/files/.mtn2git_empty diff --git a/packages/netatalk/files/init b/packages/netatalk/files/init new file mode 100755 index 0000000000..926f9bbb1e --- /dev/null +++ b/packages/netatalk/files/init @@ -0,0 +1,111 @@ +#!/sbin/runscript + +# AppleTalk daemons. Make sure not to start atalkd in the background: +# its data structures must have time to stablize before running the +# other processes. + +depend() { + need net + use logger dns +} + +atalk_startup () { +# . /etc/netatalk/netatalk.conf + + if [ "${ATALKD_RUN}" != "no" ]; then + ebegin "Starting atalkd" + start-stop-daemon --start --quiet --exec /usr/sbin/atalkd + eend $? + + for reg in \ + "${ATALK_NAME}:Workstation${ATALK_ZONE}" \ + "${ATALK_NAME}:netatalk${ATALK_ZONE}" + do + ebegin " Registering $reg" + /usr/bin/nbprgstr "$reg" + eend $? + done + + if [ "${PAPD_RUN}" = "yes" ]; then + ebegin " Starting papd" + start-stop-daemon --start --quiet --exec /usr/sbin/papd + eend $? + fi + + fi + + if [ "${CNID_METAD_RUN}" = "yes" ] ; then + ebegin "Starting cnid_metad" + start-stop-daemon --start --quiet --exec /usr/sbin/cnid_metad + eend $? + fi + + + if [ "${AFPD_RUN}" = "yes" ]; then + ebegin "Starting afpd" + start-stop-daemon --start --quiet --exec /usr/sbin/afpd -- \ + ${AFPD_UAMLIST} -g ${AFPD_GUEST} -c ${AFPD_MAX_CLIENTS} \ + -n "${ATALK_NAME}${ATALK_ZONE}" + eend $? + fi + + if [ "${TIMELORD_RUN}" = "yes" ]; then + ebegin "Starting timelord" + start-stop-daemon --start --quiet --exec /usr/sbin/timelord + eend $? + fi +} + +start () { + . /etc/netatalk/netatalk.conf + + if [ x"${ATALK_BGROUND}" = x"yes" ]; then + echo "Starting netatalk in the background ... " + atalk_startup >& /dev/null & + else + atalk_startup + fi +} + +stop () { + . /etc/netatalk/netatalk.conf + + if [ "${AFPD_RUN}" = "yes" ]; then + ebegin "Stopping afpd" + start-stop-daemon --stop --quiet --exec /usr/sbin/afpd + eend $? + fi + + if [ "${TIMELORD_RUN}" = "yes" ]; then + ebegin "Stopping timelord" + start-stop-daemon --stop --quiet --exec /usr/sbin/timelord + eend $? + fi + + if [ "${ATALKD_RUN}" != "no" ]; then + if [ "${PAPD_RUN}" = "yes" ]; then + ebegin "Stopping papd" + start-stop-daemon --stop --quiet --exec /usr/sbin/papd + eend $? + fi + + for reg in \ + "${ATALK_NAME}:Workstation${ATALK_ZONE}" \ + "${ATALK_NAME}:netatalk${ATALK_ZONE}" + do + ebegin "Unregistering $reg" + /usr/bin/nbpunrgstr "$reg" + eend $? + done + + ebegin "Stopping atalkd" + start-stop-daemon --stop --quiet --exec /usr/sbin/atalkd + eend $? + fi + + if [ "${CNID_METAD_RUN}" = "yes" ] ; then + ebegin "Stopping cnid_metad" + start-stop-daemon --stop --quiet --exec /usr/sbin/cnid_metad + eend $? + fi +} diff --git a/packages/netatalk/netatalk-2.0.3/.mtn2git_empty b/packages/netatalk/netatalk-2.0.3/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/netatalk/netatalk-2.0.3/.mtn2git_empty diff --git a/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-db43.patch b/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-db43.patch new file mode 100644 index 0000000000..93d3e4b9ea --- /dev/null +++ b/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-db43.patch @@ -0,0 +1,32 @@ +Index: netatalk-2.0.3/bin/cnid/cnid_index.c +=================================================================== +--- netatalk-2.0.3.orig/bin/cnid/cnid_index.c ++++ netatalk-2.0.3/bin/cnid/cnid_index.c +@@ -274,7 +274,11 @@ static int dbif_count(const int dbi, u_i + DB_BTREE_STAT *sp; + DB *db = db_table[dbi].db; + ++#if DB_VERSION_MAJOR > 4 || ( DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3 ) ++ ret = db->stat(db, db_txn, &sp, 0); ++#else + ret = db->stat(db, &sp, 0); ++#endif + + if (ret) { + LOG(log_error, logtype_cnid, "error getting stat infotmation on database: %s", db_strerror(errno)); +Index: netatalk-2.0.3/etc/cnid_dbd/dbif.c +=================================================================== +--- netatalk-2.0.3.orig/etc/cnid_dbd/dbif.c ++++ netatalk-2.0.3/etc/cnid_dbd/dbif.c +@@ -514,7 +514,11 @@ int dbif_count(const int dbi, u_int32_t + DB_BTREE_STAT *sp; + DB *db = db_table[dbi].db; + ++#if DB_VERSION_MAJOR > 4 || ( DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3 ) ++ ret = db->stat(db, db_txn, &sp, 0); ++#else + ret = db->stat(db, &sp, 0); ++#endif + + if (ret) { + LOG(log_error, logtype_cnid, "error getting stat infotmation on database: %s", db_strerror(errno)); diff --git a/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-newerdb.patch b/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-newerdb.patch new file mode 100644 index 0000000000..f64c8cf5eb --- /dev/null +++ b/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-newerdb.patch @@ -0,0 +1,28 @@ +Index: netatalk-2.0.3/macros/db3-check.m4 +=================================================================== +--- netatalk-2.0.3.orig/macros/db3-check.m4 ++++ netatalk-2.0.3/macros/db3-check.m4 +@@ -115,6 +115,14 @@ int main(void) { + AC_DEFUN([NETATALK_BERKELEY_LINK], + [ + atalk_cv_lib_db=no ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_4,[-ldb-4.4]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db44,[-ldb44]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_44,[-ldb-44]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_4,[-ldb-4-4]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_3,[-ldb-4.3]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db43,[-ldb43]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_43,[-ldb-43]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_3,[-ldb-4-3]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_2,[-ldb-4.2]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db42,[-ldb42]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db_42,[-ldb-42]) +@@ -134,7 +142,7 @@ AC_DEFUN([AC_PATH_BDB], + trybdbdir="" + dobdbsearch=yes + bdb_search_dirs="/usr/local/include /usr/include" +- search_subdirs="/db4.2 /db42 /db4.1 /db41 /db4 /" ++ search_subdirs="/db4.4 /db44 /db4.3 /db43 /db4.2 /db42 /db4.1 /db41 /db4 /" + + dnl required BDB version + DB_MAJOR_REQ=4 diff --git a/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-setXid.patch b/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-setXid.patch new file mode 100644 index 0000000000..70170c134d --- /dev/null +++ b/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-setXid.patch @@ -0,0 +1,14 @@ +Index: netatalk-2.0.3/bin/afppasswd/Makefile.am +=================================================================== +--- netatalk-2.0.3.orig/bin/afppasswd/Makefile.am ++++ netatalk-2.0.3/bin/afppasswd/Makefile.am +@@ -12,7 +12,8 @@ afppasswd_SOURCES = afppasswd.c + afppasswd_LDADD = $(top_builddir)/libatalk/libatalk.la @SSL_LIBS@ + + CFLAGS = @CFLAGS@ @SSL_CFLAGS@ -I$(top_srcdir)/sys \ +- -D_PATH_AFPDPWFILE=\"$(pkgconfdir)/afppasswd\" ++ -D_PATH_AFPDPWFILE=\"$(pkgconfdir)/afppasswd\" \ ++ @BINDNOW_FLAGS@ + + install-exec-hook: + if USE_DHX diff --git a/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-xfs.patch b/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-xfs.patch new file mode 100644 index 0000000000..e91ebcebd2 --- /dev/null +++ b/packages/netatalk/netatalk-2.0.3/netatalk-2.0.3-xfs.patch @@ -0,0 +1,22 @@ +Index: netatalk-2.0.3/configure.in +=================================================================== +--- netatalk-2.0.3.orig/configure.in ++++ netatalk-2.0.3/configure.in +@@ -694,12 +694,16 @@ fi + # AC_MSG_RESULT([enabling quotactl wrapper]) + # ) + ++AC_ARG_WITH([xfs], ++ AS_HELP_STRING([--without-xfs], [Build without XFS filesystem quota support])) ++ ++if test "x$with_xfs" != "xno"; then + # For quotas on Linux XFS filesystems + AC_CHECK_HEADERS(linux/xqm.h linux/xfs_fs.h) + AC_CHECK_HEADERS(xfs/libxfs.h xfs/xqm.h xfs/xfs_fs.h) + # For linux > 2.5.56 + AC_CHECK_HEADERS(linux/dqblk_xfs.h) +- ++fi + + dnl ----- as far as I can tell, dbtob always does the wrong thing + dnl ----- on every single version of linux I've ever played with. diff --git a/packages/netatalk/netatalk_2.0.3.bb b/packages/netatalk/netatalk_2.0.3.bb new file mode 100644 index 0000000000..74cfd84042 --- /dev/null +++ b/packages/netatalk/netatalk_2.0.3.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "Appletalk protocol suite" +SECTION = "net" +PR = "r0" +LICENSE = "GPL" + +DEPENDS = "cups db openssl libpam" + +SRC_URI = "http://ovh.dl.sourceforge.net/sourceforge/netatalk/netatalk-${PV}.tar.gz \ + file://netatalk-2.0.3-db43.patch;patch=1 \ + file://netatalk-2.0.3-newerdb.patch;patch=1 \ + file://netatalk-2.0.3-xfs.patch;patch=1 \ + file://init \ + " +INITSCRIPT_NAME = "atalk" +INITSCRIPT_PARAMS = "defaults 65" + +inherit autotools update-rc.d + +do_configure () { + autoreconf + ac_cv_header_rpcsvc_rquota_h=no LDFLAGS="-lpthread -L${STAGING_DIR}/${TARGET_SYS}/lib" ./configure \ + --build=${BUILD_SYS} \ + --host=${HOST_SYS} \ + --target=${TARGET_SYS} \ + --prefix=${prefix} \ + --with-bdb=${STAGING_DIR}/${TARGET_SYS} \ + --with-ssl-dir=${STAGING_DIR}/${TARGET_SYS} \ + --without-shadow \ + --sysconfdir=${sysconfdir} \ + --disable-nls \ + --disable-static \ + --with-pam \ + --mandir=${mandir} + cp ${STAGING_DIR}/${BUILD_SYS}/bin/${TARGET_SYS}-libtool ./${TARGET_SYS}-libtool +} + +do_install_append() { + install -D -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/atalk +} |