Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create debian package with fpm #686

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
*.o
*.deb
*.rpm
*.snap
*.tgz
*.zip
*.tar
src/y.tab.h
src/experres.h
src/gram.c
Expand Down
39 changes: 39 additions & 0 deletions src/build_rpm_package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/sh

# Install Steps
# --------------------------------
# install -d /usr/local/bin
# install sc-im /usr/local/bin/sc-im
# install scopen /usr/local/bin/scopen
# install -d /usr/local/share/sc-im
# install -m 644 doc /usr/local/share/sc-im/sc-im_help
# install -m 644 plot_pie plot_bar plot_line plot_scatter /usr/local/share/sc-im/
# install -d /usr/local/share/man/man1/
# install -m 644 sc-im.1 /usr/local/share/man/man1/sc-im.1
make

chmod 644 doc
chmod 644 plot_pie plot_bar plot_line plot_scatter
chmod 644 sc-im.1

fpm \
--force \
--rpm-use-file-permissions \
-s dir -t rpm \
-p $pkg_file_name \
--name $name \
--license bsd4-clause \
--version $ver \
--architecture all \
--description "Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal" \
--url "https://github.com/akbarnes/sc-im" \
--maintainer "Art Barnes <art@pin2.io>" \
sc-im=/usr/local/bin/sc-im \
scopen=/usr/local/bin/scopen \
doc=/usr/local/share/sc-im/sc-im_help \
plot_pie=/usr/local/share/sc-im/plot_pie \
plot_bar=/usr/local/share/sc-im/plot_bar \
plot_line=/usr/local/share/sc-im/plot_line \
plot_scatter=/usr/local/share/sc-im/plot_scatter \
sc-im.1=/usr/share/man/man1/sc-im.1

66 changes: 66 additions & 0 deletions src/create_fpm_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/sh

# Install Steps
# --------------------------------
# install -d /usr/local/bin
# install sc-im /usr/local/bin/sc-im
# install scopen /usr/local/bin/scopen
# install -d /usr/local/share/sc-im
# install -m 644 doc /usr/local/share/sc-im/sc-im_help
# install -m 644 plot_pie plot_bar plot_line plot_scatter /usr/local/share/sc-im/
# install -d /usr/local/share/man/man1/
# install -m 644 sc-im.1 /usr/local/share/man/man1/sc-im.1
make

chmod 644 doc
chmod 644 plot_pie plot_bar plot_line plot_scatter
chmod 644 sc-im.1

name=sc-im
ver=0.8.2
arch=any
pkg_file_name="$name-$ver-$arch.deb"

fpm \
--force \
--deb-use-file-permissions \
-s dir -t deb \
-p $pkg_file_name \
--name $name \
--license bsd4-clause \
--version $ver \
--architecture all \
--description "Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal" \
--url "https://github.com/akbarnes/sc-im" \
--maintainer "Art Barnes <art@pin2.io>" \
sc-im=/usr/local/bin/sc-im \
scopen=/usr/local/bin/scopen \
doc=/usr/local/share/sc-im/sc-im_help \
plot_pie=/usr/local/share/sc-im/plot_pie \
plot_bar=/usr/local/share/sc-im/plot_bar \
plot_line=/usr/local/share/sc-im/plot_line \
plot_scatter=/usr/local/share/sc-im/plot_scatter \
sc-im.1=/usr/share/man/man1/sc-im.1

pkg_file_name="$name-$ver-$arch.snap"

fpm \
--force \
-s dir -t snap \
-p $pkg_file_name \
--name $name \
--license bsd4-clause \
--version $ver \
--architecture all \
--description "Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal" \
--url "https://github.com/akbarnes/sc-im" \
--maintainer "Art Barnes <art@pin2.io>" \
sc-im=/usr/local/bin/sc-im \
scopen=/usr/local/bin/scopen \
doc=/usr/local/share/sc-im/sc-im_help \
plot_pie=/usr/local/share/sc-im/plot_pie \
plot_bar=/usr/local/share/sc-im/plot_bar \
plot_line=/usr/local/share/sc-im/plot_line \
plot_scatter=/usr/local/share/sc-im/plot_scatter \
sc-im.1=/usr/share/man/man1/sc-im.1

39 changes: 39 additions & 0 deletions src/create_rpm_package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/sh

# Install Steps
# --------------------------------
# install -d /usr/local/bin
# install sc-im /usr/local/bin/sc-im
# install scopen /usr/local/bin/scopen
# install -d /usr/local/share/sc-im
# install -m 644 doc /usr/local/share/sc-im/sc-im_help
# install -m 644 plot_pie plot_bar plot_line plot_scatter /usr/local/share/sc-im/
# install -d /usr/local/share/man/man1/
# install -m 644 sc-im.1 /usr/local/share/man/man1/sc-im.1
make

chmod 644 doc
chmod 644 plot_pie plot_bar plot_line plot_scatter
chmod 644 sc-im.1

fpm \
--force \
--rpm-use-file-permissions \
-s dir -t rpm \
-p $pkg_file_name \
--name $name \
--license bsd4-clause \
--version $ver \
--architecture all \
--description "Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal" \
--url "https://github.com/akbarnes/sc-im" \
--maintainer "Art Barnes <art@pin2.io>" \
sc-im=/usr/local/bin/sc-im \
scopen=/usr/local/bin/scopen \
doc=/usr/local/share/sc-im/sc-im_help \
plot_pie=/usr/local/share/sc-im/plot_pie \
plot_bar=/usr/local/share/sc-im/plot_bar \
plot_line=/usr/local/share/sc-im/plot_line \
plot_scatter=/usr/local/share/sc-im/plot_scatter \
sc-im.1=/usr/share/man/man1/sc-im.1

Empty file modified src/doc
100755 → 100644
Empty file.