leaf/hints/build.txt

52 lines
1.6 KiB
Plaintext
Raw Normal View History

几种常见的构建系统
1. GNU Make & GNU Autotools
------------------------------------------------------------
./configure --prefix=/usr
make
make DESTDIR=$pkgdir install
------------------------------------------------------------
2. CMake
------------------------------------------------------------
mdkir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
..
make
make DESTDIR=$pkgdir install
------------------------------------------------------------
3. Meson & Ninja
------------------------------------------------------------
mkdir build
cd build
meson setup --prefix=/usr \
--libdir=/usr/lib \
--buildtype=release \
-Dtests=false \
..
ninja
DESTDIR=$pkgdir ninja install
------------------------------------------------------------
4. Python setup.py
------------------------------------------------------------
python3 setup.py build
python3 setup.py install --root=$pkgdir --optimize=1
------------------------------------------------------------
5. Python Pip
------------------------------------------------------------
pip3 wheel -w dist --no-build-isolation --no-deps $PWD
pip3 install --no-deps --no-warn-script-location --no-index --find-links dist --no-cache-dir --no-user --force-reinstall --root $pkgdir <Package Name>
------------------------------------------------------------
6. Perl
------------------------------------------------------------
perl Makefile.PL INSTALLDIRS=vendor
make
make DESTDIR=$pkgdir install
------------------------------------------------------------