1 # Builds two .deb packages, for x86 (i386) and x86_64 (amd64)
2 # These packages are the bare minimum, which means that they can be installed
3 # But they do not feature everything yet.
4 # This does not mean that the editor itself is affected.
6 function getControl() {
11 echo Maintainer: \"Zachary Yedidia\" \<zyedidia@gmail.com\>
12 echo Standards-Version: 3.9.8
13 echo Homepage: https://micro-editor.github.io/
15 echo "Description: A modern and intuitive terminal-based text editor"
16 echo " This package contains a modern alternative to other terminal-based"
17 echo " Editors. It is easy to Use, highly customizable via themes and plugins"
18 echo " and it supports mouse input"
21 function installFiles() {
22 TO="$1/$2/usr/share/doc/micro/"
25 cp ../LICENSE-THIRD-PARTY $TO
27 gzip -c ../assets/packaging/micro.1 > $1/$2/usr/share/man/man1/micro.1.gz
28 cp ../assets/packaging/micro.desktop $1/$2/usr/share/applications/
29 cp ../assets/logo.svg $1/$2/usr/share/icons/micro.svg
35 version=$(go run build-version.go)
37 echo "Building packages for Version '$version'"
38 echo "Running Cross-Compile"
39 ./cross-compile.sh $version
41 echo "Beginning package build process"
43 PKGPATH="../packages/deb"
46 mkdir -p $PKGPATH/amd64/DEBIAN/
47 mkdir -p $PKGPATH/i386/DEBIAN/
49 getControl "amd64" "$version" > $PKGPATH/amd64/DEBIAN/control
50 tar -xzf "../binaries/micro-$version-linux64.tar.gz" "micro-$version/micro"
51 mkdir -p $PKGPATH/amd64/usr/local/bin/
52 mv "micro-$version/micro" "$PKGPATH/amd64/usr/local/bin/"
54 getControl "i386" "$version" > $PKGPATH/i386/DEBIAN/control
55 tar -xzf "../binaries/micro-$version-linux32.tar.gz" "micro-$version/micro"
56 mkdir -p $PKGPATH/i386/usr/local/bin/
57 mv "micro-$version/micro" "$PKGPATH/i386/usr/local/bin/"
59 rm -rf "micro-$version"
61 installFiles $PKGPATH "amd64"
62 installFiles $PKGPATH "i386"
64 dpkg -b "$PKGPATH/amd64/" "../packages/micro-$version-amd64.deb"
65 dpkg -b "$PKGPATH/i386/" "../packages/micro-$version-i386.deb"