|
4 | 4 |
|
5 | 5 | reponame="" # leave this blank for auto-detection |
6 | 6 | libname="" # leave this blank for auto-detection |
| 7 | +packagename="" # leave this blank for auto-selection |
7 | 8 |
|
8 | 9 | debianlog="debian/changelog" |
9 | 10 | debcontrol="debian/control" |
@@ -60,7 +61,12 @@ if [ -z "$libname" ]; then |
60 | 61 | libname=$(echo "$libname" | tr "[A-Z]" "[a-z]") && cd "$debdir" |
61 | 62 | fi |
62 | 63 |
|
| 64 | +if [ -z "$packagename" ]; then |
| 65 | + packagename="$libname" |
| 66 | +fi |
| 67 | + |
63 | 68 | echo "reponame is $reponame and libname is $libname" |
| 69 | +echo "output packages will be python-$packagename and python3-$packagename" |
64 | 70 |
|
65 | 71 | # checking generating changelog file |
66 | 72 |
|
|
83 | 89 |
|
84 | 90 | inform "checking debian/copyright file..." |
85 | 91 |
|
86 | | -if ! grep "^Source" $debcopyright | grep "$libname" $debcopyright &> /dev/null; then |
| 92 | +if ! grep "^Source" $debcopyright | grep "$reponame" &> /dev/null; then |
87 | 93 | warning "$(grep "^Source" $debcopyright)" && FLAG=true |
88 | 94 | fi |
89 | 95 |
|
90 | | -if ! grep "^Upstream-Name" $debcopyright | grep "$libname" $debcopyright &> /dev/null; then |
| 96 | +if ! grep "^Upstream-Name" $debcopyright | grep "$libname" &> /dev/null; then |
91 | 97 | warning "$(grep "^Upstream-Name" $debcopyright)" && FLAG=true |
92 | 98 | fi |
93 | 99 |
|
94 | 100 | # checking debian/control file |
95 | 101 |
|
96 | 102 | inform "checking debian/control file..." |
97 | 103 |
|
98 | | -if ! grep "^Source" $debcontrol | grep "$libname" $debcontrol &> /dev/null; then |
| 104 | +if ! grep "^Source" $debcontrol | grep "$libname" &> /dev/null; then |
99 | 105 | warning "$(grep "^Source" $debcontrol)" && FLAG=true |
100 | 106 | fi |
101 | 107 |
|
102 | | -if ! grep "^Homepage" $debcontrol | grep "$reponame" $debcontrol &> /dev/null; then |
| 108 | +if ! grep "^Homepage" $debcontrol | grep "$reponame" &> /dev/null; then |
103 | 109 | warning "$(grep "^Homepage" $debcontrol)" && FLAG=true |
104 | 110 | fi |
105 | 111 |
|
106 | | -if ! grep "^Package: python-$libname" $debcontrol &> /dev/null; then |
| 112 | +if ! grep "^Package: python-$packagename" $debcontrol &> /dev/null; then |
107 | 113 | warning "$(grep "^Package: python-" $debcontrol)" && FLAG=true |
108 | 114 | fi |
109 | 115 |
|
110 | | -if ! grep "^Package: python3-$libname" $debcontrol &> /dev/null; then |
| 116 | +if ! grep "^Package: python3-$packagename" $debcontrol &> /dev/null; then |
111 | 117 | warning "$(grep "^Package: python3-" $debcontrol)" && FLAG=true |
112 | 118 | fi |
113 | 119 |
|
|
120 | 126 |
|
121 | 127 | inform "checking debian/rules file..." |
122 | 128 |
|
123 | | -if ! grep "debian/python-$libname" $debrules &> /dev/null; then |
| 129 | +if ! grep "debian/python-$packagename" $debrules &> /dev/null; then |
124 | 130 | warning "$(grep "debian/python-" $debrules)" && FLAG=true |
125 | 131 | fi |
126 | 132 |
|
127 | | -if ! grep "debian/python3-$libname" $debrules &> /dev/null; then |
| 133 | +if ! grep "debian/python3-$packagename" $debrules &> /dev/null; then |
128 | 134 | warning "$(grep "debian/python3-" $debrules)" && FLAG=true |
129 | 135 | fi |
130 | 136 |
|
|
0 commit comments