Skip to content

Commit

Permalink
Add build script for xbps package
Browse files Browse the repository at this point in the history
  • Loading branch information
slamko committed Jun 25, 2022
1 parent af6fc3e commit 60be436
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ spm
.vscode/
.cache/
*.diff
spm-*/
File renamed without changes.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TARGET=spm
LIBS=-pthread -lm -lbsd
WEFLAGS=-Wall -Wextra -Wno-unused-parameter -Werror -pedantic
CFLAGS=$(WEFLAGS) -g -Iinclude/
VERSION=1.0_3

SRCD=src
HEADERD=include
Expand Down Expand Up @@ -47,6 +48,26 @@ install: $(TARGET) $(OBJDIRS)
cp -f ./$(TARGET) $(BIN)
chmod 755 $(BIN)

installdirs: $(TARGET) COPYING README.md
mkdir -p $(TARGET)-$(VERSION)/usr/share/licenses/spm
mkdir -p $(TARGET)-$(VERSION)/usr/share/doc/spm
mkdir $(TARGET)-$(VERSION)/usr/bin
mkdir -p $(TARGET)-$(VERSION)/usr/man/man1/
cp COPYING $(TARGET)-$(VERSION)/usr/share/licenses/spm
cp README.md $(TARGET)-$(VERSION)/usr/share/doc/spm
cp $(TARGET) $(TARGET)-$(VERSION)/usr/bin
cp spm1 $(TARGET)-$(VERSION)/usr/man/man1/

xbps-clean:
$(RM) x86_64-repodata
$(RM) spm-1.0_3.x86_64.xbps
sudo xbps-remove spm

xbps-build: xbps-clean
./build.sh
xbps-rindex -a *.xbps
sudo xbps-install --repository=$(shell pwd) spm

uninstall:
$(RM) $(BIN)

Expand Down
Empty file added spm1
Empty file.
1 change: 1 addition & 0 deletions xbps-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xbps-create -A x86_64 -n spm-1.0_3 -D "git>=2.9.5 xdg-utils>=1.0.0" -H "https://github.com/slamko/spm" -s "Suckless Patch Manager" --compression=xz -B "cp spm /bin/spm" .

0 comments on commit 60be436

Please sign in to comment.