Changeset 2566:9bf417837888 for build-tools/dh-make-dotclear
- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
build-tools/dh-make-dotclear
r0 r2566 6 6 private $type; 7 7 private $today; 8 8 9 9 private $id; 10 10 private $package_name; … … 13 13 private $author; 14 14 private $version; 15 15 16 16 public function __construct($module,$type) 17 17 { … … 20 20 } 21 21 $this->type = $type; 22 22 23 23 if (!$module || !is_dir($module)) { 24 24 throw new Exception(sprintf('Module %s does not exist',$module)); 25 25 } 26 26 27 27 $mod_define = $module.'/_define.php'; 28 28 29 29 if (!is_file($mod_define)) { 30 30 throw new Exception(sprintf('Module %s does not have _define.php file',$module)); 31 31 } 32 32 33 33 if (is_dir($module.'/debian')) { 34 34 throw new Exception(sprintf('Module %s already have a debian directory',$module)); 35 35 } 36 36 37 37 include $mod_define; 38 38 $this->id = strtolower(basename(realpath($module))); 39 39 $this->package_name = 'libdotclear-'.$this->type.'-'.$this->id; 40 40 41 41 # Creating debian directory 42 42 $this->deb = $module.'/debian'; 43 43 mkdir($this->deb); 44 44 45 45 $this->createFile('changelog',$this->changelogTPL()); 46 46 $this->createFile('compat',"4\n"); … … 51 51 chmod($this->deb.'/rules',0755); 52 52 } 53 53 54 54 private function registerModule($name,$desc,$author,$version) 55 55 { … … 59 59 $this->version = $version; 60 60 } 61 61 62 62 private function createFile($name,$content='') 63 63 { … … 66 66 fclose($fp); 67 67 } 68 68 69 69 private function changelogTPL() 70 70 { … … 76 76 " -- ".$this->author." <email@example.com> ".date('r')."\n\n"; 77 77 } 78 78 79 79 private function controlTPL() 80 80 { … … 96 96 "\n"; 97 97 } 98 98 99 99 private function copyrightTPL() 100 100 { … … 126 126 "\n"; 127 127 } 128 128 129 129 private function dirsTPL() 130 130 { … … 132 132 '/usr/share/dotclear/'.$this->type.'s/'.$this->id."\n"; 133 133 } 134 134 135 135 private function rulesTPL() 136 136 {
Note: See TracChangeset
for help on using the changeset viewer.