Initial debian packaging
This commit is contained in:
parent
ecd858dc9d
commit
8af56a5a34
5 changed files with 99 additions and 0 deletions
49
Makefile
Normal file
49
Makefile
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
prefix ?= /usr/local
|
||||||
|
bindir = $(prefix)/bin
|
||||||
|
libdir = $(prefix)/lib
|
||||||
|
includedir = $(prefix)/include
|
||||||
|
datarootdir = $(prefix)/share
|
||||||
|
datadir = $(datarootdir)
|
||||||
|
|
||||||
|
TARGET = debug
|
||||||
|
DEBUG ?= 0
|
||||||
|
ifeq ($(DEBUG),0)
|
||||||
|
TARGET = release
|
||||||
|
ARGS += --release
|
||||||
|
endif
|
||||||
|
|
||||||
|
VENDOR ?= 0
|
||||||
|
ifneq ($(VENDOR),0)
|
||||||
|
ARGS += --frozen
|
||||||
|
endif
|
||||||
|
|
||||||
|
BIN = cosmic-workspaces
|
||||||
|
|
||||||
|
all: $(BIN)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf target
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -rf .cargo vendor vendor.tar
|
||||||
|
|
||||||
|
$(BIN): Cargo.toml Cargo.lock src/main.rs vendor-check
|
||||||
|
cargo build $(ARGS) --bin ${BIN}
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -Dm0755 target/$(TARGET)/$(BIN) $(DESTDIR)$(bindir)/$(BIN)
|
||||||
|
|
||||||
|
## Cargo Vendoring
|
||||||
|
|
||||||
|
vendor:
|
||||||
|
rm .cargo -rf
|
||||||
|
mkdir -p .cargo
|
||||||
|
cargo vendor | head -n -1 > .cargo/config
|
||||||
|
echo 'directory = "vendor"' >> .cargo/config
|
||||||
|
tar cf vendor.tar vendor
|
||||||
|
rm -rf vendor
|
||||||
|
|
||||||
|
vendor-check:
|
||||||
|
ifeq ($(VENDOR),1)
|
||||||
|
rm vendor -rf && tar xf vendor.tar
|
||||||
|
endif
|
||||||
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
cosmic-workspaces (0.1.0) jammy; urgency=medium
|
||||||
|
|
||||||
|
* Initial release.
|
||||||
|
|
||||||
|
-- Ian Scott <idscott@system76.com> Fri, 20 Jan 2023 15:21:34 -0800
|
||||||
20
debian/control
vendored
Normal file
20
debian/control
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
Source: cosmic-workspaces
|
||||||
|
Section: admin
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: System76 <info@system76.com>
|
||||||
|
Build-Depends:
|
||||||
|
debhelper (>= 11),
|
||||||
|
debhelper-compat (= 11),
|
||||||
|
cargo,
|
||||||
|
libudev-dev,
|
||||||
|
libxkbcommon-dev,
|
||||||
|
pkg-config,
|
||||||
|
Standards-Version: 4.3.0
|
||||||
|
Homepage: https://github.com/pop-os/cosmic-workspaces-epoch
|
||||||
|
|
||||||
|
Package: cosmic-workspaces
|
||||||
|
Architecture: amd64 arm64
|
||||||
|
Depends:
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Cosmic workspaces
|
||||||
24
debian/rules
vendored
Executable file
24
debian/rules
vendored
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
CLEAN ?= 1
|
||||||
|
VENDOR ?= 1
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_auto_clean:
|
||||||
|
ifeq ($(CLEAN),1)
|
||||||
|
make clean
|
||||||
|
endif
|
||||||
|
ifeq ($(VENDOR),1)
|
||||||
|
if ! ischroot; then \
|
||||||
|
make vendor; \
|
||||||
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
env CARGO_HOME="$$(pwd)/target/cargo" \
|
||||||
|
make all VENDOR=$(VENDOR) prefix=/usr
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
dh_auto_install -- prefix=/usr
|
||||||
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
3.0 (native)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue