Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build deb #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build/
builddir/
out
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
build: check clean_build clean_out
cd ./build && meson .. >> ./.log && ninja >> ./.log
cd ./build && mkdir -p ../out/bin/ && mv ./facad ../out/bin/

clean_out:
rm -rf ./out && mkdir ./out

clean_build:
rm -rf ./build && mkdir ./build

clean_out:
rm -rf ./out && mkdir ./out
mkdir ./out/bin
mkdir ./out/deb

build_dev:


build_deb: build check_deb
mkdir -p ./out/deb/facad/usr/local/bin
mkdir -p ./out/deb/facad/DEBIAN
cp ./out/bin/facad ./out/deb/facad/usr/local/bin/
echo "Package: facad" > ./out/deb/facad/DEBIAN/control
echo "Version: 1.0" >> ./out/deb/facad/DEBIAN/control
echo "Section: utils" >> ./out/deb/facad/DEBIAN/control
echo "Priority: optional" >> ./out/deb/facad/DEBIAN/control
echo "Architecture: amd64" >> ./out/deb/facad/DEBIAN/control
echo "Maintainer: Sergey Veneckiy <s.venetsky@gmail.com>" >> ./out/deb/facad/DEBIAN/control
echo "Description: A modern, colorful directory listing tool for the command line." >> ./out/deb/facad/DEBIAN/control
dpkg-deb --build ./out/deb/facad
rm -rf ./out/deb/facad

check:
@command -v meson >/dev/null 2>&1 || { echo "meson is not installed. Please install meson and try again."; exit 1; }
@command -v ninja >/dev/null 2>&1 || { echo "ninja is not installed. Please install ninja and try again."; exit 1; }

check_deb:
@command -v dpkg-deb >/dev/null 2>&1 || { echo "dpkg-deb is not installed. Please install dpkg-deb and try again."; exit 1; }

install: build
cd ./build && sudo ninja install