Add fpm script to make RPM and Deb packages
2
Makefile
|
@ -86,7 +86,7 @@ mingw: doodads bindata
|
|||
mingw-free: doodads bindata
|
||||
env CGO_ENABLED="1" CC="/usr/bin/x86_64-w64-mingw32-gcc" \
|
||||
GOOS="windows" CGO_LDFLAGS="-lmingw32 -lSDL2" CGO_CFLAGS="-D_REENTRANT" \
|
||||
go build $(LDFLAGS_W) -i -o bin/doodle.exe cmd/doodle/main.go
|
||||
go build $(LDFLAGS_W) -tags="shareware" -i -o bin/doodle.exe cmd/doodle/main.go
|
||||
env CGO_ENABLED="1" CC="/usr/bin/x86_64-w64-mingw32-gcc" \
|
||||
GOOS="windows" CGO_LDFLAGS="-lmingw32 -lSDL2" CGO_CFLAGS="-D_REENTRANT" \
|
||||
go build $(LDFLAGS) -tags="shareware" -i -o bin/doodad.exe cmd/doodad/main.go
|
||||
|
|
BIN
etc/icons/1024.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
etc/icons/128.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
etc/icons/16.png
Normal file
After Width: | Height: | Size: 750 B |
BIN
etc/icons/256.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
etc/icons/32.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
etc/icons/512.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
etc/icons/64.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
12
etc/linux/net.kirsle.ProjectDoodle.desktop
Executable file
|
@ -0,0 +1,12 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=Project: Doodle
|
||||
GenericName=Project Doodle
|
||||
X-GNOME-FullName=Project: Doodle - A drawing-based maze game
|
||||
Comment=A drawing-based maze game.
|
||||
Exec=/opt/project-doodle/doodle
|
||||
Icon=project-doodle
|
||||
StartupNotify=true
|
||||
Keywords=game;maze;
|
||||
Categories=Game;
|
60
scripts/fpm-bundle.sh
Executable file
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
|
||||
# fpm-bundle: create bundles for the app.
|
||||
|
||||
VERSION=`grep -e 'Version =' ../../pkg/branding/branding.go | head -n 1 | cut -d '"' -f 2`
|
||||
INSTALL_ROOT="/opt/project-doodle"
|
||||
LAUNCHER_FILE="../../etc/linux/net.kirsle.ProjectDoodle.desktop"
|
||||
LAUNCHER_ROOT="/usr/share/applications" # Where the .desktop file goes.
|
||||
ICON_ROOT="/usr/share/icons/hicolor/"
|
||||
|
||||
if [[ ! -f "./doodle" ]]; then
|
||||
echo Run this script from the directory containing the Doodle binary.
|
||||
echo This is usually at /dist/doodle-VERSION/ relative to the git root.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "$LAUNCHER_FILE" ]]; then
|
||||
echo "Didn't find Linux desktop launcher relative to current folder."
|
||||
echo "I looked at $LAUNCHER_FILE."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Clean previous artifacts.
|
||||
rm *.rpm *.deb
|
||||
|
||||
# Create the root structure.
|
||||
mkdir -p root
|
||||
mkdir -p root$INSTALL_ROOT root$LAUNCHER_ROOT
|
||||
cp * root$INSTALL_ROOT/
|
||||
cp $LAUNCHER_FILE root$LAUNCHER_ROOT/
|
||||
|
||||
# Copy icons in.
|
||||
mkdir -p root$ICON_ROOT/{256x256,128x128,64x64,32x32,16x16}/apps
|
||||
cp ../../etc/icons/256.png "root${ICON_ROOT}256x256/apps/project-doodle.png"
|
||||
cp ../../etc/icons/128.png "root${ICON_ROOT}128x128/apps/project-doodle.png"
|
||||
cp ../../etc/icons/64.png "root$ICON_ROOT/64x64/apps/project-doodle.png"
|
||||
cp ../../etc/icons/32.png "root$ICON_ROOT/32x32/apps/project-doodle.png"
|
||||
cp ../../etc/icons/16.png "root$ICON_ROOT/16x16/apps/project-doodle.png"
|
||||
|
||||
echo =====================
|
||||
echo Starting fpm package build.
|
||||
echo =====================
|
||||
|
||||
# RPM Package
|
||||
fpm -C ./root -s dir -t rpm \
|
||||
-d SDL2 -d SDL2_ttf -a x86_64 \
|
||||
-n project-doodle -v ${VERSION} \
|
||||
--license="Copyright only" \
|
||||
--maintainer=noah@kirsle.net \
|
||||
--description="Project: Doodle - A drawing-based maze game." \
|
||||
--url="https://www.kirsle.net/doodle"
|
||||
|
||||
# Debian Package
|
||||
fpm -C ./root -s dir -t deb \
|
||||
-d libsdl2 -d libsdl2-ttf -a x86_64 \
|
||||
-n project-doodle -v ${VERSION} \
|
||||
--license="Copyright only" \
|
||||
--maintainer=noah@kirsle.net \
|
||||
--description="Project: Doodle - A drawing-based maze game." \
|
||||
--url="https://www.kirsle.net/doodle"
|