This repository has been archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
191 lines (191 loc) · 7.91 KB
/
pom.xml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.teragrep</groupId>
<artifactId>rlo-04</artifactId>
<version>${version.tag}-${rpm.release}</version>
<packaging>rpm</packaging>
<properties>
<version.tag>1</version.tag>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<rpm.release>${env.BUILD_ID}.${env.TARGET_OS}.x86_64</rpm.release>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<build>
<directory>${project.basedir}/target</directory>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
<testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<executions>
<execution>
<id>rsyslog-checkout</id>
<phase>generate-sources</phase>
<goals>
<goal>checkout</goal>
</goals>
<configuration>
<connectionUrl>scm:git:https://github.com/rsyslog/rsyslog.git</connectionUrl>
<checkoutDirectory>${project.build.directory}/rsyslog</checkoutDirectory>
<scmVersionType>tag</scmVersionType>
<scmVersion>v8.32.0</scmVersion>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>copy-sources</id>
<phase>process-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>cp</executable>
<arguments>
<argument>-a</argument>
<argument>${project.build.directory}/../src/main/c/.</argument>
<argument>.</argument>
</arguments>
<workingDirectory>${project.build.directory}/${project.artifactId}/src/main/c</workingDirectory>
</configuration>
</execution>
<execution>
<id>autoreconf</id>
<phase>process-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>autoreconf</executable>
<arguments>
<argument>-fvi</argument>
</arguments>
<workingDirectory>${project.build.directory}/${project.artifactId}/src/main/c</workingDirectory>
</configuration>
</execution>
<execution>
<id>configure</id>
<phase>process-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./configure</executable>
<arguments>
<argument>--prefix=/opt/teragrep/${project.artifactId}</argument>
</arguments>
<workingDirectory>${project.build.directory}/${project.artifactId}/src/main/c</workingDirectory>
<environmentVariables>
<LDFLAGS>-pie -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/opt/teragrep/rsyslog/libfastjson/lib:/opt/teragrep/rsyslog/libestr/lib -L/opt/teragrep/rsyslog/libfastjson/lib -L/opt/teragrep/rsyslog/libestr/lib</LDFLAGS>
<LD_LIBRARY_PATH>/opt/teragrep/rsyslog/libfastjson/lib:/opt/teragrep/rsyslog/libestr/lib</LD_LIBRARY_PATH>
<LIBS>-ldl -lrt -lestr -lfastjson</LIBS>
<CFLAGS>-ggdb -fpie -fPIC -std=c99 -I/opt/teragrep/rsyslog/libfastjson/include/libfastjson -I/opt/teragrep/rsyslog/libestr/include -I${project.build.directory}/rsyslog/runtime -I${project.build.directory}/rsyslog/grammar -I${project.build.directory}/rsyslog -DHAVE_ATOMIC_BUILTINS64 -D_DEFAULT_SOURCE</CFLAGS>
</environmentVariables>
</configuration>
</execution>
<execution>
<id>make</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>make</executable>
<arguments>
<argument>-j1</argument>
</arguments>
<workingDirectory>${project.build.directory}/${project.artifactId}/src/main/c</workingDirectory>
</configuration>
</execution>
<execution>
<id>make-install</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>make</executable>
<arguments>
<argument>-j1</argument>
<argument>install</argument>
<argument>DESTDIR=${project.build.directory}/buildroot</argument>
</arguments>
<workingDirectory>${project.build.directory}/${project.artifactId}/src/main/c</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- rpm packaging -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>generate-rpm</id>
<goals>
<goal>rpm</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<defineStatements>
<defineStatement>_build_id_links none</defineStatement>
<defineStatement>__provides_exclude ^.*\\.so.*$</defineStatement>
<defineStatement>__requires_exclude ^.*\\.so.*$</defineStatement>
</defineStatements>
<summary>teragrep ${project.artifactId}</summary>
<name>${project.artifactId}</name>
<version>${project.version}</version>
<release>${rpm.release}</release>
<license>Proprietary</license>
<distribution>teragrep rsyslog</distribution>
<vendor>https://teragrep.com/</vendor>
<packager>teragrep <servicedesk@teragrep.com></packager>
<group>teragrep/rsyslog</group>
<description> teragrep ${project.artifactId} </description>
<needarch>true</needarch>
<provides>
<provide>${project.artifactId}</provide>
</provides>
<defaultUsername>root</defaultUsername>
<defaultGroupname>root</defaultGroupname>
<defaultFilemode>0644</defaultFilemode>
<defaultDirmode>0755</defaultDirmode>
<mappings>
<mapping>
<directory>/opt/teragrep/${project.artifactId}/lib</directory>
<filemode>0755</filemode>
<sources>
<source>
<location>${project.build.directory}/buildroot/opt/teragrep/${project.artifactId}/lib/tgimfile</location>
<includes>
<include>TGimfile.so</include>
</includes>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>