summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLackOfDream2016-07-11 11:49:07 +0900
committerLackOfDream2016-07-11 11:49:32 +0900
commit89b0e4007ec7b2ab28854053ff17c3f248eda251 (patch)
tree4a87ba16bb944434fb4f58149f3988765e30ed3d
downloadaur-89b0e4007ec7b2ab28854053ff17c3f248eda251.tar.gz
Initial commit
-rw-r--r--.SRCINFO22
-rw-r--r--EasyDrcom.conf36
-rw-r--r--PKGBUILD55
-rw-r--r--patch.txt20
4 files changed, 133 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ef0f8363ad0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = easydrcom-git
+ pkgdesc = 3rd Party Dr.COM Client for HITwh
+ pkgver = 08f4404
+ pkgrel = 1
+ url = https://github.com/coverxit/EasyDrcom
+ arch = i686
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ makedepends = boost
+ depends = libpcap
+ provides = EasyDrcom
+ options = !buildflags
+ source = git+https://github.com/coverxit/EasyDrcom.git
+ source = EasyDrcom.conf
+ source = patch.txt
+ md5sums = SKIP
+ md5sums = ed15888b134b18d885d81567542042a4
+ md5sums = 1dba42fe14d02ec886d8023f835fe21e
+
+pkgname = easydrcom-git
+
diff --git a/EasyDrcom.conf b/EasyDrcom.conf
new file mode 100644
index 00000000000..0eab3b60e1c
--- /dev/null
+++ b/EasyDrcom.conf
@@ -0,0 +1,36 @@
+;EasyDrcom 0.8配置文件
+[General]
+;用户名(学号)
+UserName=
+;密码
+PassWord=
+;模式: 1 - 办公区(UDP only), 2 - 宿舍区模式2(推荐使用,802.1x+UDP), 0 - 宿舍区模式1(802.1x+UDP)
+Mode=1
+;是否启动时自动上线,0 - 否,1 - 是
+AutoOnline=1
+;是否断线自动重拨,0 - 否,1 - 是
+AutoRedial=1
+
+[Remote]
+;以下三项一般情况下不需要修改
+;认证服务器IP地址
+IP=172.25.8.4
+;认证服务器端口
+Port=61440
+;是否使用广播地址(广播地址兼容性更好)
+UseBroadcast=1
+;如果使用多播地址,则下面的MAC地址将被忽略
+;认证服务器MAC地址,用冒号隔开
+MAC=00:1a:a9:c3:3a:59
+
+[Local]
+;网卡名(一般为eth0)
+NIC=
+;数据包超时时间(毫秒),一般不需要修改,若在极端网络环境下请修改
+;802.1x认证超时时间(正常为1000ms)
+EAPTimeout=10000
+;UDP数据包超时时间(正常为2000ms)
+UDPTimeout=20000
+;以下两项一般情况不需要修改
+HostName=EasyDrcom for HITwh
+KernelVersion=0.8_Ubuntu_14.04
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a3ec2673057
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# This is an example PKGBUILD file. Use this as a start to creating your own,
+# and remove these comments. For more information, see 'man PKGBUILD'.
+# NOTE: Please fill out the license field for your package! If it is unknown,
+# then please put 'unknown'.
+
+# The following guidelines are specific to BZR, GIT, HG and SVN packages.
+# Other VCS sources are not natively supported by makepkg yet.
+
+# Maintainer: Ning Humbert <galaxy0419@gmail.com>
+pkgname=easydrcom-git # '-bzr', '-git', '-hg' or '-svn'
+pkgver=08f4404
+pkgrel=1
+pkgdesc="3rd Party Dr.COM Client for HITwh"
+arch=('i686' 'x86_64')
+url="https://github.com/coverxit/EasyDrcom"
+license=('Apache')
+depends=(libpcap)
+makedepends=('git' 'boost') # 'bzr', 'git', 'mercurial' or 'subversion'
+provides=("EasyDrcom")
+options=("!buildflags")
+source=('git+https://github.com/coverxit/EasyDrcom.git'
+ 'EasyDrcom.conf'
+ 'patch.txt')
+md5sums=('SKIP'
+ 'ed15888b134b18d885d81567542042a4'
+ '1dba42fe14d02ec886d8023f835fe21e')
+
+# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
+# a description of each element in the source array.
+
+_gitname=EasyDrcom
+
+pkgver() {
+ cd $_gitname
+ echo $(git describe --always | sed 's/-/./g')
+}
+
+prepare() {
+ cd $_gitname/EasyDrcom
+ patch -p1 -i $srcdir/patch.txt
+}
+
+build() {
+ cd $_gitname/EasyDrcom
+ g++ -DLINUX -Os -s -std=c++0x -o EasyDrcom md5.c main.cpp -lpcap -lpthread
+}
+
+package() {
+ mkdir -p $pkgdir/etc
+ cp EasyDrcom.conf $pkgdir/etc/
+ cd $_gitname/EasyDrcom
+ mkdir -p $pkgdir/usr/bin
+ cp EasyDrcom $pkgdir/usr/bin/
+}
+
diff --git a/patch.txt b/patch.txt
new file mode 100644
index 00000000000..3a6fe8044dd
--- /dev/null
+++ b/patch.txt
@@ -0,0 +1,20 @@
+index cf40f31..5c9d110 100755
+--- a/main.cpp
++++ b/main.cpp
+@@ -345,14 +345,14 @@ int main(int argc, const char * argv[])
+ {
+ int ret = 0;
+ bool background = false, redirect_to_null = false;
+- std::string config_path = "EasyDrcom.conf";
++ std::string config_path = "/etc/EasyDrcom.conf";
+ auto clog_def = std::clog.rdbuf();
+ auto cout_def = std::cout.rdbuf();
+ auto cerr_def = std::cerr.rdbuf();
+ #ifdef OPENWRT
+ std::string log_path = "/tmp/EasyDrcom.log";
+ #else
+- std::string log_path = "EasyDrcom.log";
++ std::string log_path = "/tmp/EasyDrcom.log";
+ #endif
+
+ for (int i = 1; i < argc; i++)