-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathrc.yml
More file actions
271 lines (267 loc) · 10.1 KB
/
Copy pathrc.yml
File metadata and controls
271 lines (267 loc) · 10.1 KB
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
actions:
- configure: |
./configure %CONFOPTS%
- reconfigure: |
autoreconf -vfi
%configure
- autogen: |
./autogen.sh %CONFOPTS%
%configure
- make: |
make %JOBS%
- make_install: |
%make install DESTDIR="%installroot%"
- cmake: |
cmake -DCMAKE_CFLAGS="${CFLAGS}" -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_LD_FLAGS="${LDFLAGS}" -DCMAKE_LIB_SUFFIX="%LIBSUFFIX%" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=%PREFIX% \
-DCMAKE_INSTALL_LIBDIR=lib%LIBSUFFIX%
- cmake_ninja: |
function cmake_ninja() {
mkdir solusBuildDir && pushd solusBuildDir
cmake -G Ninja .. \
-DCMAKE_CFLAGS="${CFLAGS}" -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_LD_FLAGS="${LDFLAGS}" -DCMAKE_LIB_SUFFIX="%LIBSUFFIX%" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=%PREFIX% \
-DCMAKE_INSTALL_LIBDIR=lib%LIBSUFFIX% $* || exit 1
popd
}
cmake_ninja
- meson_configure: |
LC_ALL=en_US.utf8 CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" meson --prefix %PREFIX% --buildtype=plain --libdir="lib%LIBSUFFIX%" --libexecdir="lib%LIBSUFFIX%/%PKGNAME%" --sysconfdir=/etc --localstatedir=/var solusBuildDir
- ninja_build: &ninja_build |
LC_ALL=en_US.utf8 ninja %JOBS% -C solusBuildDir
- ninja_install: &ninja_install |
LC_ALL=en_US.utf8 DESTDIR="%installroot%" ninja install %JOBS% -C solusBuildDir
- ninja_check: &ninja_check |
LC_ALL=en_US.utf8 ninja test %JOBS% -C solusBuildDir
# These macros are for backward compatibility only. Please use the ninja ones
- meson_build: *ninja_build
- meson_install: *ninja_install
- meson_check: *ninja_check
- qmake: |
qmake QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}"
- qmake4: |
qmake-qt4 QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" QMAKE_LRELEASE=/usr/bin/lrelease-qt4 QMAKE_MOC=/usr/bin/moc-qt4 QMAKE_RCC=/usr/bin/rcc-qt4 QMAKE_UIC=/usr/bin/uic-qt4
- qml_cache: |
pushd $installdir
for i in `find -type f -name "*.qml"`; do
if ! [ -a "${i}"c ]; then
qmlcachegen --target-architecture=x86_64 --target-abi=x86_64-little_endian-lp64 -o "${i}"c "${i}"
fi
done
popd
- patch: |
patch -t -E --no-backup-if-mismatch -f
# Only works if the user has a series file. They can provide the name to
# override 'series' if needed
- apply_patches: |
function apply_patches() {
if [[ ! -z "$1" ]]; then
srs="$pkgfiles/$1"
else
srs="$pkgfiles/series"
fi
test -e "$srs" || exit 1
while read -r pname ; do
if [[ "$pname" == "" ]]; then
continue
fi
%patch -p1 -i $pkgfiles/$pname
done < $srs
}
apply_patches
# Make life easier with Haskell
- cabal_configure: |
export GHCV=$(ghc --numeric-version)
mkdir -p ~/.ghc/%ARCH%-linux-$GHCV/package.conf.d
cp /usr/lib%LIBSUFFIX%/ghc-$GHCV/package.conf.d/* ~/.ghc/%ARCH%-linux-$GHCV/package.conf.d
ghc-pkg recache --user
cabal configure --prefix=%PREFIX% \
--libdir=%libdir% \
--libsubdir="\$compiler/\$pkgid" \
--sysconfdir=/etc \
--enable-executable-dynamic \
--enable-shared \
--ghc-options="-O2 -fPIC"
- cabal_build: |
cabal build %JOBS%
- cabal_install: |
cabal copy --destdir=$installdir
- cabal_register: |
export GHCV=$(ghc --numeric-version)
cabal register --gen-pkg-config=$package-$version.conf
install -D -m 00644 $package-$version.conf $installdir%libdir%/ghc-$GHCV/package.conf.d/$package-$version.conf
# Make life easier with Perl
- perl_setup: |
function perl_setup() {
if [[ -e Build.PL ]]; then
perl Build.PL installdirs=vendor create_packlist=0 $* || exit 1
else
perl Makefile.PL PREFIX=%PREFIX% INSTALLDIRS=vendor DESTDIR="%installroot%" $* || exit
fi
}
perl_setup
- perl_build: |
function perl_build() {
if [[ -e Build.PL ]]; then
perl Build installdirs=vendor create_packlist=0 $* || exit 1
else
%make $* || exit 1
fi
}
perl_build
# We need to nuke use of privlib because its always a perllocal.pod situation,
# and these macros explicitly use vendor libs
- perl_install: |
function perl_install() {
if [[ -e Build.PL ]]; then
perl Build destdir="%installroot%" install $* || exit 1
else
%make_install $* || exit 1
fi
priv_lib="%perl_privlib%"
if [[ -e "$installdir/$priv_lib" ]]; then
rm -rfv "$installdir/$priv_lib"
fi
}
perl_install
- python_setup: |
function python_setup() {
if [[ -e $PKG_BUILD_DIR/.workdir ]]; then
cd $(cat $PKG_BUILD_DIR/.workdir)
else
echo $workdir > $PKG_BUILD_DIR/.workdir
fi
instdir=`basename $PWD`
pushd ..
cp -a $instdir py2build && pushd py2build
python2.7 setup.py build $* || exit
popd
popd
}
python_setup
- python_install: |
function python_install() {
if [[ -e $PKG_BUILD_DIR/.workdir ]]; then
cd $(cat $PKG_BUILD_DIR/.workdir)
else
echo $workdir > $PKG_BUILD_DIR/.workdir
fi
instdir=`basename $PWD`
pushd ..
if [[ ! -d py2build ]]; then
cp -a $instdir py2build
fi
pushd py2build
python2.7 setup.py install --root="%installroot%" $* || exit
popd
popd
}
python_install
- python_compile: |
function python_compile() {
if [ -z "$1" ]; then
python2 -m compileall -q $installdir || exit 1
else
python2 -m compileall -q $* || exit 1
fi
}
python_compile
- python3_setup: |
function python3_setup() {
if [[ -e $PKG_BUILD_DIR/.workdir ]]; then
cd $(cat $PKG_BUILD_DIR/.workdir)
else
echo $workdir > $PKG_BUILD_DIR/.workdir
fi
instdir=`basename $PWD`
pushd ..
cp -a $instdir py3build && pushd py3build
python3 setup.py build $* || exit
popd
popd
}
python3_setup
- python3_install: |
function python3_install() {
if [[ -e $PKG_BUILD_DIR/.workdir ]]; then
cd $(cat $PKG_BUILD_DIR/.workdir)
else
echo $workdir > $PKG_BUILD_DIR/.workdir
fi
instdir=`basename $PWD`
pushd ..
if [[ ! -d py3build ]]; then
cp -a $instdir py3build
fi
pushd py3build
python3 setup.py install --root="%installroot%" $* || exit
popd
popd
}
python3_install
- python3_compile: |
function python3_compile() {
if [ -z "$1" ]; then
python3 -m compileall -q $installdir || exit 1
else
python3 -m compileall -q $* || exit 1
fi
}
python3_compile
# Make life easier with Ruby gems
- gem_build: |
function gem_build() {
if [ -z "$1" ]; then
gem build *.gemspec || exit 1
else
gem build $* || exit 1
fi
}
gem_build
- gem_install: |
function gem_install() {
export geminstalldir=$(ruby -e'puts Gem.default_dir')
export GEM_HOME=$geminstalldir
export GEM_PATH=$geminstalldir
if [ -a *.gem ]; then
gem install --ignore-dependencies --no-user-install --no-document -i "$installdir/$geminstalldir" -n "$installdir/usr/bin" *.gem || exit 1
else
gem install --ignore-dependencies --no-user-install --no-document -i "$installdir/$geminstalldir" -n "$installdir/usr/bin" $sources/*.gem || exit 1
fi
if [[ -e "$installdir/$geminstalldir/cache" ]]; then
rm -rfv $installdir/$geminstalldir/cache
fi
}
gem_install
- waf_configure: |
./waf configure --prefix=%PREFIX%
- waf_build: |
./waf build --jobs="%YJOBS%"
- waf_install: |
./waf install --jobs="%YJOBS%" --destdir="%installroot%"
- llvm_profile_merge: |
if [[ -d "$YPKG_PGO_DIR" ]]; then
pushd "$YPKG_PGO_DIR"
if [[ ! -e default.profdata ]]; then
llvm-profdata merge -output=default.profdata default-*.profraw
fi
popd
else
echo "\n\nError: Profiling requested by ypkg but doesn't exist\n\n"
fi
defines:
- CONFOPTS: |
--prefix=%PREFIX% --build=%HOST% --libdir=%libdir% --mandir=/usr/share/man \
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc \
--localstatedir=/var --libexecdir=%libdir%/%PKGNAME%
# Inspired by the RPM guys :]
- perl_privlib: |
$(eval `perl -V:installprivlib`; echo $installprivlib)
# Get LTS kernel version
- kernel_version_lts: |
$(echo "$(basename `readlink /usr/lib/kernel/default-lts` | cut -d '.' -f 4,5,6)".lts)
# Get "Current" kernel version
- kernel_version_current: |
$(echo "$(basename `readlink /usr/lib/kernel/default-current` | cut -d '.' -f 4,5,6)".current)