Skip to content

Instantly share code, notes, and snippets.

@jshen28
Last active February 12, 2019 04:18
Show Gist options
  • Save jshen28/631a9a15460918bede44300aa3e1bb01 to your computer and use it in GitHub Desktop.
Save jshen28/631a9a15460918bede44300aa3e1bb01 to your computer and use it in GitHub Desktop.

DPKG CHEATSHEET

# Download .deb file from repo
apt downloadd ${PACKAGE_NAME}

# extract control info
dpkg-deb -R ${PACKAGE_NAME} ${TO_WHERE}

# download source build
apt source ${PACKAGE_NAME}

# sources & executable only
dpkg -x ${PACKAGE_NAME} ${TO_WHERE}

# build deb binary
# to skip tests: DEB_BUILD_OPTIONS=nocheck deb -i -us -uc -b
deb -i -us -uc -b

# prepare deb folder
# credit to http://minkush.me/cardbook-debian-package/
dh_make\
 --native \
 --single \
 --packagename cardbook_1.0.0 \
 --email minkush@example.com

REFERENCES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment