Skip to content

Instantly share code, notes, and snippets.

@rbtylee
Last active October 8, 2019 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbtylee/7b77b59da9e11656382436e5c8ca21cb to your computer and use it in GitHub Desktop.
Save rbtylee/7b77b59da9e11656382436e5c8ca21cb to your computer and use it in GitHub Desktop.
#!/bin/bash
# flat-theme-deb.sh
#
# A sample program to illustrate how to manually build a deb file.
# This program creates a package to install The flat enlightenment/elm
# theme Raster has been working on. For Bodh linux 5.0. Same principles
# apply to all debian/ubuntu based distros.
#
# Copyright 2019 ylee@bodhilinux.com
#
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
# we set umask so mkdir creates dir with the right permissions
# otherwise with default umask on Bodhi/Ubuntu Lintian throws a warning
umask 022
# Create the directory structure for the folder used to create the deb file
mkdir -p flat/DEBIAN
mkdir -p flat/usr/share/elementary/themes
mkdir -p flat/usr/share/doc/enlightenment-theme-flat
# Add a simple control file
cat << EOF > flat/DEBIAN/control
Package: enlightenment-theme-flat
Version: 0.1.0
Section: misc
Priority: optional
Architecture: all
Maintainer: Robert Wiley <ylee@bodhilinux.com>
Depends: libefl
Description: Raster's Flat Enlightenment Theme
A Flat Elementary Theme for enlightenment
.
A work in progress and not fully completed.
EOF
# Add a simple changelog
cat << EOF > flat/usr/share/doc/enlightenment-theme-flat/changelog
enlightenment-theme-flat (0.1.0) bionic; urgency=low
* First packaging for Bodhi linux 5.x
-- Robert Wiley <ylee@bodhilinux.com> Mon, 07 Oct 2019 12:05:55 +0400
EOF
# Always gzip changelog with -9n options to aviod lintian errors
gzip -9n flat/usr/share/doc/enlightenment-theme-flat/changelog
# Add copyright info for the package
cat << EOF > flat/usr/share/doc/enlightenment-theme-flat/copyright
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: efl
Source: git://git.enlightenment.org/core/efl.git
Files: *
License: LGPL-2.1
Copyright: 2019 Carsten Haitzler <raster@rasterman.com>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1 of the License.
.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
.
You should have received a copy of the GNU Lesser General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General
Public License can be found in /usr/share/common-licenses/LGPL-2.1.
Files: debian/*
Copyright: 2019 Robert Wiley <ylee@bodhilinux.com>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
EOF
# Download the prebuild elm theme
wget https://www.dropbox.com/s/3f3n8le0e5pr8ui/flat.edj -P flat/usr/share/elementary/themes/
chmod 644 flat/usr/share/elementary/themes/flat.edj
#Create the deb file
fakeroot dpkg -b flat enlightenment-theme-flat_0.1.0_all.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment