-
Notifications
You must be signed in to change notification settings - Fork 1
/
debian.sh
executable file
·80 lines (63 loc) · 2.26 KB
/
debian.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#! /bin/sh
# Configure your paths and filenames
SOURCEBINPATH=.
LAUNCHER=
SOURCEBIN=conky-clicky.lua
SOURCEDOC=README.md
INSTALLDOC=INSTALL.md
DEBFOLDER=conky-clicky
DEBVERSION=$(date +%Y%m%d)
cd $DEBFOLDER
git pull origin master
DEBFOLDERNAME="../$DEBFOLDER-$DEBVERSION"
DEBPACKAGENAME=$DEBFOLDER\_$DEBVERSION
rm -rf $DEBFOLDERNAME
# Create your scripts source dir
mkdir $DEBFOLDERNAME
# Copy your script to the source dir
cp -R ./ $DEBFOLDERNAME/
cd $DEBFOLDERNAME
pwd
# Create the packaging skeleton (debian/*)
dh_make -s --indep --createorig
mkdir -p debian/tmp/usr
cp -R usr debian/tmp/usr
# Remove make calls
grep -v makefile debian/rules > debian/rules.new
mv debian/rules.new debian/rules
dpkg-source --commit
# debian/install must contain the list of scripts to install
# as well as the target directory
echo usr/share/lua/5.1/$SOURCEBIN usr/share/lua/5.1 >> debian/install
echo "ln -s usr/share/lua/5.1/$SOURCEBIN usr/share/lua/5.2" >> debian/install
cp $SOURCEDOC usr/share/doc/$DEBFOLDER/$SOURCEDOC
cp $INSTALLDOC usr/share/doc/$DEBFOLDER/$INSTALLDOC
cp $HACKDOC usr/share/doc/$DEBFOLDER/$HACKDOC
echo usr/share/doc/$DEBFOLDER/$SOURCEDOC usr/share/doc/$DEBFOLDER >> debian/install
echo usr/share/doc/$DEBFOLDER/$INSTALLDOC usr/share/doc/$DEBFOLDER >> debian/install
echo usr/share/doc/$DEBFOLDER/$HACKDOC usr/share/doc/$DEBFOLDER >> debian/install
echo "Source: $DEBFOLDER
Section: unknown
Priority: optional
Maintainer: cmotc <[email protected]>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.5
Homepage: https://www.github.com/cmotc/conky-clicky
#Vcs-Git: [email protected]:cmotc/conky-clicky
#Vcs-Browser: https://www.github.com/cmotc/conky-clicky
Package: $DEBFOLDER
Architecture: all
Depends: lightdm, lightdm-gtk-greeter, conky, \${misc:Depends}
Description: A network monitoring widget for awesomewm
" > debian/control
#echo "gsettings set org.gnome.desktop.session session-name awesome-gnome
#dconf write /org/gnome/settings-daemon/plugins/cursor/active false
#gconftool-2 --type bool --set /apps/gnome_settings_daemon/plugins/background/active false
#" > debian/postinst
# Remove the example files
rm debian/*.ex
rm debian/*.EX
dpkg-source --commit
# Build the package.
# You will get a lot of warnings and ../somescripts_0.1-1_i386.deb
debuild -us -uc >> ../log