make-software-properties 2.46 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/bin/sh
#
#    Copyright (C) 2011  Rubén Rodríguez <ruben@trisquel.info>
#    Copyright (C) 2011  Carlos Pais <freemind@lavabit.com>
#
#    This program 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 program 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, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
#

21
VERSION=5
22 23 24 25

. ./config

cat << EOF | patch -p1
26 27 28 29
--- source.orig/softwareproperties/SoftwareProperties.py        2014-04-14 17:10:58.000000000 +0200
+++ source/softwareproperties/SoftwareProperties.py     2014-05-18 03:02:05.309290804 +0200
@@ -724,7 +724,15 @@
     site is in whitelist or the shortcut implementer adds it.
30
     """
31 32
 
-    (deb_line, file) = shortcut.expand(codename=self.distro.codename)
33
+    codenames = {}
34
+    codenames["belenos"] = "trusty" 
35
+    codenames["toutatis"] = "precise" 
36 37 38 39 40
+    codenames["brigantia"] = "oneiric" 
+    codenames["dagda"] = "natty"
+    codenames["slaine"] = "maverick"
+    codenames["taranis"] = "lucid"
+    codenames["awen"] = "karmic" 
41
+    (deb_line, file) = shortcut.expand(codename=codenames[self.distro.codename])
42
     deb_line = self.expand_http_line(deb_line)
43 44
     debsrc_entry_type = 'deb-src' if enable_source_code else '# deb-src'
     debsrc_line = debsrc_entry_type + deb_line[3:]
45 46
EOF

47 48 49
sed '/UbuntuDrivers/d' -i softwareproperties/gtk/SoftwarePropertiesGtk.py
sed '/vbox_drivers/,+1 s/True/False/' -i data/gtkbuilder/main.ui

50 51 52 53 54
replace Kubuntu Triskel .
replace Ubuntu Trisquel .
replace ftpmaster@ubuntu.com trisquel-devel@listas.trisquel.info .
replace cdimage@ubuntu.com trisquel-devel@listas.trisquel.info .
replace TrisquelDistribution UbuntuDistribution .
55
sed '/NoDisplay/d; s/Trisquel/Ubuntu/' -i data/software-properties-gtk.desktop.in
56

57
sed '/ubuntu-drivers-common/d' -i debian/control
58
sed '/software-properties-drivers/d' -i debian/software-properties-gtk.install setup.cfg
59

60 61
replace "Trisquel-Gettext" "Ubuntu-Gettext" .

62 63 64 65
changelog "Adapted for Trisquel codenames"

compile