summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-03-01 20:09:06 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-03-01 20:09:55 -0500
commit04bedad8ef1f6f92873d7bed67f0017db4095e77 (patch)
tree88e4c5be95599f570db481f8c687fd6672cd0256
parent2cda3faccf750296225f1a6c0ddc740755841129 (diff)
.deb installer!
-rw-r--r--.gitignore1
-rw-r--r--Makefile15
-rw-r--r--control11
-rw-r--r--main.c1
-rw-r--r--ted.desktop9
5 files changed, 35 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index e1566fa..d9cb2f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,4 @@ TAGS
*.a
pcre2-10.36
SDL2
+*.deb
diff --git a/Makefile b/Makefile
index 2700a91..4728941 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,6 @@ install: release
chown `logname`:`logname` $(LOCAL_DATA_DIR)
cp -r assets $(GLOBAL_DATA_DIR)
install -m 644 ted.cfg $(GLOBAL_DATA_DIR)
- [ ! -e $(LOCAL_DATA_DIR)/ted.cfg ] && install -o `logname` -g `logname` -m 644 ted.cfg $(LOCAL_DATA_DIR) || :
install ted $(INSTALL_BIN_DIR)
libpcre2-32.a: pcre2-10.36.zip
rm -rf pcre2-10.36
@@ -34,3 +33,17 @@ libpcre2-32.a: pcre2-10.36.zip
cd pcre2-10.36/build && cmake -DPCRE2_BUILD_PCRE2_32=ON .. && $(MAKE) -j8
cp pcre2-10.36/build/$@ ./
+ted.deb: release
+ rm -rf /tmp/ted
+ mkdir -p /tmp/ted/DEBIAN
+ mkdir -p /tmp/ted$(INSTALL_BIN_DIR)
+ mkdir -p /tmp/ted$(GLOBAL_DATA_DIR)
+ mkdir -p /tmp/ted/usr/share/icons/hicolor/48x48/apps/
+ convert assets/icon.bmp -resize 48x48 /tmp/ted/usr/share/icons/hicolor/48x48/apps/ted.png
+ mkdir -p /tmp/ted/usr/share/applications
+ cp ted.desktop /tmp/ted/usr/share/applications
+ cp ted /tmp/ted$(INSTALL_BIN_DIR)/
+ cp -r assets ted.cfg /tmp/ted$(GLOBAL_DATA_DIR)/
+ cp control /tmp/ted/DEBIAN
+ dpkg-deb --build /tmp/ted
+ mv /tmp/ted.deb ./
diff --git a/control b/control
new file mode 100644
index 0000000..76f25c4
--- /dev/null
+++ b/control
@@ -0,0 +1,11 @@
+Package: ted
+Version: 1.0
+Section: text
+Priority: optional
+Architecture: amd64
+Essential: no
+Maintainer: Pommicket <pommicket@gmail.com>
+Description: A text editor.
+Installed-Size: 3145728
+Depends: libsdl2-2.0-0
+Homepage: https://github.com/pommicket/ted
diff --git a/main.c b/main.c
index e7b50c3..2f5b793 100644
--- a/main.c
+++ b/main.c
@@ -1,7 +1,6 @@
// @TODO:
// - test update ted with windows installer
// - test on BSD
-// - .deb file
// - completion
diff --git a/ted.desktop b/ted.desktop
new file mode 100644
index 0000000..aac773c
--- /dev/null
+++ b/ted.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=ted
+Comment=A text editor
+Exec=ted
+Icon=ted.png
+Terminal=false
+Categories=Utility;TextEditor;