| 145 | f.write(contents) |
| 146 | |
| 147 | def create_copyright_file(): |
| 148 | # The license is "Unknown" when opening deb package in |
| 149 | # Ubuntu Software Center. It's a known bug: |
| 150 | # https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/435183 |
| 151 | log("Creating debian copyright file") |
| 152 | copyright = COPYRIGHT |
| 153 | copyright = re.sub("[\r\n]", "\n", copyright) |
| 154 | copyright += "\n" |
| 155 | copyright += "License: BSD 3-clause\n" |
| 156 | with open(INSTALLER+"/../../../License", "r") as f: |
| 157 | license = f.readlines() |
| 158 | for line in license: |
| 159 | if not len(re.sub("\s+", "", line)): |
| 160 | copyright += " .\n" |
| 161 | else: |
| 162 | copyright += " "+line.rstrip()+"\n" |
| 163 | copyright += "\n" |
| 164 | with open(DEBIAN+"/copyright", "w") as f: |
| 165 | f.write(copyright) |
| 166 | |
| 167 | def copy_postinst_script(): |
| 168 | # When creating .postinst file in the debian directory, |