Compare commits

...

10 Commits
1.0.0 ... main

Author SHA1 Message Date
earnest ma e7aab11f9f
chore(ci): Use Woodpecker CI
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-04-27 18:36:20 -04:00
earnest ma 2271857b7c
chore: Update README
* Update LICENSE to 2022
* Migrated project sources to https://git.earne.link/earnestma/aptpkg
2022-04-27 18:36:20 -04:00
earnest ma a1cffdb13f
chore(release): aptpkg 1.1.0 2021-10-16 18:33:22 -04:00
earnest ma a9e21971fb
feat: -v / --version to show current version 2021-10-16 18:31:55 -04:00
earnest ma 93652c35a3
docs: Document short options as well 2021-10-16 18:31:29 -04:00
earnest ma aa417bebab
feat: --all to build all folders under directory 2021-10-16 18:30:39 -04:00
earnest ma 02bac12c49
docs: Document --auto needing aptpkg in PATH 2021-10-16 18:08:45 -04:00
earnest ma dd285f65a5
chore(release): aptpkg 1.0.1 2021-10-08 13:57:24 -04:00
earnest ma 161b78fd26
chore(docs): Update man pages
* Document $customcontrol
* Ability to skip checksum verification
2021-10-08 12:39:56 -04:00
earnest ma dc4d6244ae
fix: Homepage: $url should point to homepage
Not the first $source
2021-10-08 10:28:02 -04:00
7 changed files with 67 additions and 43 deletions

View File

@ -1,14 +0,0 @@
image: ubuntu/next
packages:
- dpkg
- dpkg-dev
- scdoc
- shellcheck
sources:
- https://git.sr.ht/~earnestma/aptpkg
tasks:
- test: |
cd aptpkg
make test

20
.woodpecker.yml Normal file
View File

@ -0,0 +1,20 @@
branches: main # Ideally, only run on pushes to main branch and PRs
pipeline:
pull-request:
image: ubuntu:jammy
when:
event: [ pull_request ]
commands:
- apt -y update
- apt -y install dpkg dpkg-dev scdoc shellcheck
- make test
main:
image: ubuntu:jammy
when:
event: push
branch: main
commands:
- apt -y update
- apt -y install dpkg dpkg-dev scdoc shellcheck
- make test

View File

@ -1,4 +1,4 @@
Copyright © 2021 earnest ma <me@earne.link>
Copyright © 2021-2022 earnest ma <me@earne.link>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in

View File

@ -1,14 +1,11 @@
# aptpkg
[![sr.ht Project hub](https://img.shields.io/badge/sr.ht-Project%20hub-grey)](https://sr.ht/~earnestma/aptpkg)
[![builds.sr.ht status](https://builds.sr.ht/~earnestma/aptpkg/commits.svg)](https://builds.sr.ht/~earnestma/aptpkg/commits?)
- **[aptpkg.earne.link packaging git
repository](https://git.sr.ht/~earnestma/aptpkg-pkgs)**
- **[aptpkg.earne.link Package archive setup/
info](https://man.sr.ht/~earnestma/aptpkg)**
**Please note:** I am not actively using or maintaining this project.
Easily create/ get debian packages. aptpkg can be used to easily create/ get
debian packages, and can be used with a tool such as **reprepro**(1).
- [packaging repo example](https://git.earne.link/earnestma/aptpkg-pkgs)
- [wiki page](https://git.earne.link/earnestma/aptpkg/wiki)
aptpkg can be used to easily create/ get debian packages, and can be used with a tool such as **reprepro**(1).
## Prerequisites
@ -23,14 +20,8 @@ Run `aptpkg --help` or `man aptpkg` for more information.
## Contribute
Send patches to [this mailing
list](https://lists.sr.ht/~earnestma/aptpkg-devel); you can follow [this
guide](https://git-send-email.io) if you don't know how.
File **confirmed** bugs/ feature requests
[here](https://todo.sr.ht/~earnestma/aptpkg)!
Creating [issues](https://git.earne.link/earnestma/aptpkg/issues), [discussion](https://discuss.earne.link/t/earnest), or [pull requests](https://git.earne.link/earnestma/aptpkg/pulls) are welcome!
## License
`aptpkg` is published under an MIT License. See the LICENSE file for copyright
and license details.
`aptpkg` is published under an MIT License. See the LICENSE file for copyright and license details.

24
aptpkg
View File

@ -1,7 +1,7 @@
#! /usr/bin/env bash
# Init variables
APTPKG_VERSION="1.0.0"
APTPKG_VERSION="1.1.0"
# Show help
show_help(){
@ -15,8 +15,10 @@ For more documentation, run man aptpkg
Usage:
aptpkg [directory]
aptpkg --all [directory] Build all folders under directory
aptpkg --auto (commit id) Autobuild modified packages from commit
aptpkg -h, --help Show help
aptpkg -v, --version Show version
EOF
}
@ -80,9 +82,9 @@ build_file(){
cd "$1" || error_usage_die "Problem with changing directory"
mkdir -p "$builddir"
for url in $source; do
for urls in $source; do
echo "Getting $source"
wget -q "$url"
wget -q "$urls"
done
verify
@ -148,13 +150,29 @@ change_autobuild_pkgs(){
done
}
# Build all in directory
build_all_in_dir(){
[ -d "$1" ] || error_usage_die "Provide a directory"
buildfile_folders=$(ls -d "$1"/*)
for ww in $buildfile_folders; do
printf "\nBuilding %s\n\n" "$ww"
aptpkg "$ww"
done
}
# Run!
case $1 in
-h|--help)
show_help ;;
--all)
shift
build_all_in_dir "$1" ;;
--auto)
shift
change_autobuild_pkgs "$1" ;;
-v|--version)
echo "aptpkg $APTPKG_VERSION" ;;
*)
if [ $# -ne 1 ]; then
error_usage_die "You must provide one directory"

View File

@ -8,9 +8,13 @@ aptpkg - easily create/ get debian packages
*aptpkg* _path_
*aptpkg* --all _path_
*aptpkg* --auto [git commit hash]
*aptpkg* --help
*aptpkg* -h | --help
*aptpkg* -v | --version
# DESCRIPTION
@ -19,7 +23,11 @@ a tool such as *reprepro*(1).
Provide aptpkg with a path to a folder containing an *aptpkg*(5) build file.
The --auto option can also be used to build modified packages based on a git
commit hash, using _HEAD_ if one is not provided.
commit hash, using _HEAD_ if one is not provided. The aptpkg script *must* be
available in $PATH.
For mass rebuilds, aptpkg --auto can be used, passing a directory with folders
under which the build files are located.
# SEE ALSO
@ -27,5 +35,4 @@ commit hash, using _HEAD_ if one is not provided.
# AUTHORS
Sources, maintainers list, and how to submit bugs/ patches can be done at
https://sr.ht/~earnestma/aptpkg.
https://git.earne.link/earnestma/aptpkg

View File

@ -28,14 +28,17 @@ More maintainers can be listed after.
- type=file: Download file(s), check, and execute the _steps_ function
- url: Homepage of upstream
- description: Description similar to what upstream says
- customcontrol: This is optional and only if extra information needs to be
added to the control file
## SOURCE
Provide a URL pointing to the file to download
Provide URL(s) pointing to the file(s) to download
## SHA512SUMS
The output of `sha512sum filename` that will be used to verify
The output of `sha512sum filename` that will be used to verify. Write SKIP if
you do not want any verification done.
## STEPS
@ -54,9 +57,8 @@ postinst, prerm, and postrm
*aptpkg*(1)
Files that aptpkg.earne.link uses: https://git.sr.ht/~earnestma/aptpkg-pkgs
Some good packaging file examples: https://git.earne.link/earnestma/aptpkg-pkgs
# AUTHORS
Sources, maintainers list, and how to submit bugs/ patches can be done at
https://sr.ht/~earnestma/aptpkg.
https://git.earne.link/earnestma/aptpkg