OLD | NEW |
1 #------------------------------------------------------------------------------ | 1 #------------------------------------------------------------------------------ |
2 # chrome.spec | 2 # chrome.spec |
3 #------------------------------------------------------------------------------ | 3 #------------------------------------------------------------------------------ |
4 | 4 |
5 #------------------------------------------------------------------------------ | 5 #------------------------------------------------------------------------------ |
6 # Prologue information | 6 # Prologue information |
7 #------------------------------------------------------------------------------ | 7 #------------------------------------------------------------------------------ |
8 Summary : @@MENUNAME@@ | 8 Summary : @@MENUNAME@@ |
9 License : Multiple, see @@PRODUCTURL@@ | 9 License : Multiple, see @@PRODUCTURL@@ |
10 Name : @@PACKAGE_FILENAME@@ | 10 Name : @@PACKAGE_FILENAME@@ |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 #%doc README | 81 #%doc README |
82 | 82 |
83 # We cheat and just let RPM figure it out for us; everything we install | 83 # We cheat and just let RPM figure it out for us; everything we install |
84 # should go under this prefix anyways. | 84 # should go under this prefix anyways. |
85 @@INSTALLDIR@@ | 85 @@INSTALLDIR@@ |
86 | 86 |
87 # Be explicit about the files we scatter throughout the system we don't | 87 # Be explicit about the files we scatter throughout the system we don't |
88 # accidentally "own" stuff that's not ours (crbug.com/123990). | 88 # accidentally "own" stuff that's not ours (crbug.com/123990). |
89 /etc/cron.daily/@@PACKAGE@@ | 89 /etc/cron.daily/@@PACKAGE@@ |
90 %ghost %attr(755,root,root) /usr/bin/google-chrome | 90 %ghost %attr(755,root,root) /usr/bin/google-chrome |
| 91 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ |
91 /usr/share/applications/@@PACKAGE@@.desktop | 92 /usr/share/applications/@@PACKAGE@@.desktop |
92 /usr/share/gnome-control-center/default-apps/@@PACKAGE@@.xml | 93 /usr/share/gnome-control-center/default-apps/@@PACKAGE@@.xml |
93 %docdir /usr/share/man/man1 | 94 %docdir /usr/share/man/man1 |
94 /usr/share/man/man1/@@PACKAGE@@.1 | 95 /usr/share/man/man1/@@PACKAGE@@.1 |
95 | 96 |
96 #------------------------------------------------------------------------------ | 97 #------------------------------------------------------------------------------ |
97 # Pre install script | 98 # Pre install script |
98 #------------------------------------------------------------------------------ | 99 #------------------------------------------------------------------------------ |
99 %pre | 100 %pre |
100 | 101 |
101 exit 0 | 102 exit 0 |
102 | 103 |
103 | 104 |
104 | 105 |
105 | 106 |
106 #------------------------------------------------------------------------------ | 107 #------------------------------------------------------------------------------ |
107 # Post install script | 108 # Post install script |
108 #------------------------------------------------------------------------------ | 109 #------------------------------------------------------------------------------ |
109 %post | 110 %post |
110 | 111 |
111 @@include@@../common/variables.include | |
112 | |
113 @@include@@../common/postinst.include | 112 @@include@@../common/postinst.include |
114 | 113 |
115 @@include@@../common/rpm.include | 114 @@include@@../common/rpm.include |
116 | 115 |
117 @@include@@../common/symlinks.include | 116 @@include@@../common/symlinks.include |
118 | 117 |
119 remove_nss_symlinks | 118 remove_nss_symlinks |
120 add_nss_symlinks | 119 add_nss_symlinks |
121 | 120 |
122 remove_chrome_symlinks | |
123 add_chrome_symlinks | |
124 | |
125 remove_udev_symlinks | 121 remove_udev_symlinks |
126 | 122 |
127 DEFAULTS_FILE="/etc/default/@@PACKAGE@@" | 123 DEFAULTS_FILE="/etc/default/@@PACKAGE@@" |
128 if [ ! -e "$DEFAULTS_FILE" ]; then | 124 if [ ! -e "$DEFAULTS_FILE" ]; then |
129 echo 'repo_add_once="true"' > "$DEFAULTS_FILE" | 125 echo 'repo_add_once="true"' > "$DEFAULTS_FILE" |
130 fi | 126 fi |
131 | 127 |
132 . "$DEFAULTS_FILE" | 128 . "$DEFAULTS_FILE" |
133 | 129 |
134 if [ "$repo_add_once" = "true" ]; then | 130 if [ "$repo_add_once" = "true" ]; then |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 # Pre uninstallation script | 181 # Pre uninstallation script |
186 #------------------------------------------------------------------------------ | 182 #------------------------------------------------------------------------------ |
187 %preun | 183 %preun |
188 | 184 |
189 if [ "$1" -eq "0" ]; then | 185 if [ "$1" -eq "0" ]; then |
190 mode="uninstall" | 186 mode="uninstall" |
191 elif [ "$1" -eq "1" ]; then | 187 elif [ "$1" -eq "1" ]; then |
192 mode="upgrade" | 188 mode="upgrade" |
193 fi | 189 fi |
194 | 190 |
195 @@include@@../common/variables.include | |
196 | |
197 @@include@@../common/rpm.include | 191 @@include@@../common/rpm.include |
198 | 192 |
199 @@include@@../common/symlinks.include | 193 @@include@@../common/symlinks.include |
200 | 194 |
201 # Only remove menu items and symlinks on uninstall. When upgrading, | 195 # Only remove menu items and symlinks on uninstall. When upgrading, |
202 # old_pkg's %preun runs after new_pkg's %post. | 196 # old_pkg's %preun runs after new_pkg's %post. |
203 if [ "$mode" = "uninstall" ]; then | 197 if [ "$mode" = "uninstall" ]; then |
204 @@include@@../common/prerm.include | 198 @@include@@../common/prerm.include |
| 199 remove_nss_symlinks |
| 200 remove_udev_symlinks |
| 201 |
205 %{_sbindir}/update-alternatives --remove google-chrome \ | 202 %{_sbindir}/update-alternatives --remove google-chrome \ |
206 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ | 203 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ |
207 | |
208 remove_nss_symlinks | |
209 remove_chrome_symlinks | |
210 remove_udev_symlinks | |
211 fi | 204 fi |
212 | 205 |
213 # On Debian we only remove when we purge. However, RPM has no equivalent to | 206 # On Debian we only remove when we purge. However, RPM has no equivalent to |
214 # dpkg --purge, so this is all disabled. | 207 # dpkg --purge, so this is all disabled. |
215 # | 208 # |
216 #determine_rpm_package_manager | 209 #determine_rpm_package_manager |
217 # | 210 # |
218 #case $PACKAGEMANAGER in | 211 #case $PACKAGEMANAGER in |
219 #"yum") | 212 #"yum") |
220 # remove_yum | 213 # remove_yum |
221 # ;; | 214 # ;; |
222 #"urpmi") | 215 #"urpmi") |
223 # remove_urpmi | 216 # remove_urpmi |
224 # ;; | 217 # ;; |
225 #"yast") | 218 #"yast") |
226 # remove_yast | 219 # remove_yast |
227 # ;; | 220 # ;; |
228 #esac | 221 #esac |
229 | 222 |
230 exit 0 | 223 exit 0 |
231 | 224 |
232 #------------------------------------------------------------------------------ | 225 #------------------------------------------------------------------------------ |
233 # Post uninstallation script | 226 # Post uninstallation script |
234 #------------------------------------------------------------------------------ | 227 #------------------------------------------------------------------------------ |
235 %postun | 228 %postun |
236 | 229 |
237 exit 0 | 230 exit 0 |
OLD | NEW |