Skip to content

Commit

Permalink
add script to create deb
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielOgorchock committed Nov 8, 2019
1 parent 378f73a commit 83f28c8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ cmake_install.cmake
joycond
install_manifest.txt
.ccls-cache
build
43 changes: 43 additions & 0 deletions build_deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# This is a hacky little script to generate a deb.
#
# NOTE: This only works for building an arm64 .deb as is. Change
# the Architecture below if desired.

architecture="arm64"
install_root="$(pwd)/build/deb/joycond"
package_version="0.1-0"

mkdir -p "$install_root" || exit
cmake . || exit
make DESTDIR="$install_root" install || exit

cd "$install_root" || exit

mkdir -p DEBIAN
cd DEBIAN || exit

cat <<EOF > control
Package: joycond
Architecture: $architecture
Maintainer: Daniel J. Ogorchock
Priority: optional
Version: $package_version
Description: Pairs joy-cons together into a virtual controller
Depends: libevdev2, libudev1
EOF

cat <<EOF > conffiles
EOF

cat <<EOF > postinst
#!/bin/bash
echo "Enabling and starting joycond service..."
systemctl enable --now joycond
EOF
chmod 755 postinst

cd ../..

fakeroot dpkg-deb --build joycond || exit

0 comments on commit 83f28c8

Please sign in to comment.