forked from alibaba/DataX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patht_dp_dw_datax_3_hook_dqc.spec
executable file
·57 lines (42 loc) · 1.16 KB
/
t_dp_dw_datax_3_hook_dqc.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Name: t_dp_dw_datax_3_hook_dqc
Packager:xiafei.qiuxf
Version:2014122220.3
Release: 1
Summary: datax 3 dqc hook
URL: http://gitlab.alibaba-inc.com/datax/datax
Group: t_dp
License: Commercial
BuildArch: noarch
%define __os_install_post %{nil}
%description
CodeUrl: http://gitlab.alibaba-inc.com/datax/datax
datax dqc hook
%{_svn_path}
%{_svn_revision}
%define _prefix /home/admin/datax3/hook/dqc
%prep
export LANG=zh_CN.UTF-8
%pre
grep -q "^cug-tbdp:" /etc/group &>/dev/null || groupadd -g 508 cug-tbdp &>/dev/null || true
grep -q "^taobao:" /etc/passwd &>/dev/null || useradd -u 503 -g cug-tbdp taobao &>/dev/null || true
%build
BASE_DIR="${OLDPWD}/../"
cd ${BASE_DIR}/
#/home/ads/tools/apache-maven-3.0.3/bin/
mvn install -N
#/home/ads/tools/apache-maven-3.0.3/bin/
mvn install -pl common -DskipTests
cd ${BASE_DIR}/dqchook
#/home/ads/tools/apache-maven-3.0.3/bin/
mvn clean package -DskipTests assembly:assembly
cd ${BASE_DIR}
%install
BASE_DIR="${OLDPWD}/../"
mkdir -p .%{_prefix}
cp -r ${BASE_DIR}/dqchook/target/datax/hook/dqc/* .%{_prefix}/
%post
chmod -R 0755 %{_prefix}
%files
%defattr(755,admin,cug-tbdp)
%config(noreplace) %{_prefix}/dqc.properties
%{_prefix}