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@@ | |
Lei Zhang
2016/06/29 00:57:45
Presumably you've installed the RPM and it's not h
Tom (Use chromium acct)
2016/06/29 01:03:43
I didn't see that even before this change
| |
92 /usr/share/applications/@@PACKAGE@@.desktop | 91 /usr/share/applications/@@PACKAGE@@.desktop |
93 /usr/share/gnome-control-center/default-apps/@@PACKAGE@@.xml | 92 /usr/share/gnome-control-center/default-apps/@@PACKAGE@@.xml |
94 %docdir /usr/share/man/man1 | 93 %docdir /usr/share/man/man1 |
95 /usr/share/man/man1/@@PACKAGE@@.1 | 94 /usr/share/man/man1/@@PACKAGE@@.1 |
96 | 95 |
97 #------------------------------------------------------------------------------ | 96 #------------------------------------------------------------------------------ |
98 # Pre install script | 97 # Pre install script |
99 #------------------------------------------------------------------------------ | 98 #------------------------------------------------------------------------------ |
100 %pre | 99 %pre |
101 | 100 |
102 exit 0 | 101 exit 0 |
103 | 102 |
104 | 103 |
105 | 104 |
106 | 105 |
107 #------------------------------------------------------------------------------ | 106 #------------------------------------------------------------------------------ |
108 # Post install script | 107 # Post install script |
109 #------------------------------------------------------------------------------ | 108 #------------------------------------------------------------------------------ |
110 %post | 109 %post |
111 | 110 |
111 @@include@@../common/variables.include | |
112 | |
112 @@include@@../common/postinst.include | 113 @@include@@../common/postinst.include |
113 | 114 |
114 @@include@@../common/rpm.include | 115 @@include@@../common/rpm.include |
115 | 116 |
116 @@include@@../common/symlinks.include | 117 @@include@@../common/symlinks.include |
117 | 118 |
118 remove_nss_symlinks | 119 remove_nss_symlinks |
119 add_nss_symlinks | 120 add_nss_symlinks |
120 | 121 |
122 remove_chrome_symlinks | |
123 add_chrome_symlinks | |
124 | |
121 remove_udev_symlinks | 125 remove_udev_symlinks |
122 | 126 |
123 DEFAULTS_FILE="/etc/default/@@PACKAGE@@" | 127 DEFAULTS_FILE="/etc/default/@@PACKAGE@@" |
124 if [ ! -e "$DEFAULTS_FILE" ]; then | 128 if [ ! -e "$DEFAULTS_FILE" ]; then |
125 echo 'repo_add_once="true"' > "$DEFAULTS_FILE" | 129 echo 'repo_add_once="true"' > "$DEFAULTS_FILE" |
126 fi | 130 fi |
127 | 131 |
128 . "$DEFAULTS_FILE" | 132 . "$DEFAULTS_FILE" |
129 | 133 |
130 if [ "$repo_add_once" = "true" ]; then | 134 if [ "$repo_add_once" = "true" ]; then |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 # Pre uninstallation script | 185 # Pre uninstallation script |
182 #------------------------------------------------------------------------------ | 186 #------------------------------------------------------------------------------ |
183 %preun | 187 %preun |
184 | 188 |
185 if [ "$1" -eq "0" ]; then | 189 if [ "$1" -eq "0" ]; then |
186 mode="uninstall" | 190 mode="uninstall" |
187 elif [ "$1" -eq "1" ]; then | 191 elif [ "$1" -eq "1" ]; then |
188 mode="upgrade" | 192 mode="upgrade" |
189 fi | 193 fi |
190 | 194 |
195 @@include@@../common/variables.include | |
196 | |
191 @@include@@../common/rpm.include | 197 @@include@@../common/rpm.include |
192 | 198 |
193 @@include@@../common/symlinks.include | 199 @@include@@../common/symlinks.include |
194 | 200 |
195 # Only remove menu items and symlinks on uninstall. When upgrading, | 201 # Only remove menu items and symlinks on uninstall. When upgrading, |
196 # old_pkg's %preun runs after new_pkg's %post. | 202 # old_pkg's %preun runs after new_pkg's %post. |
197 if [ "$mode" = "uninstall" ]; then | 203 if [ "$mode" = "uninstall" ]; then |
198 @@include@@../common/prerm.include | 204 @@include@@../common/prerm.include |
199 remove_nss_symlinks | |
200 remove_udev_symlinks | |
201 | |
202 %{_sbindir}/update-alternatives --remove google-chrome \ | 205 %{_sbindir}/update-alternatives --remove google-chrome \ |
203 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ | 206 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ |
207 | |
208 remove_nss_symlinks | |
209 remove_chrome_symlinks | |
210 remove_udev_symlinks | |
204 fi | 211 fi |
205 | 212 |
206 # On Debian we only remove when we purge. However, RPM has no equivalent to | 213 # On Debian we only remove when we purge. However, RPM has no equivalent to |
207 # dpkg --purge, so this is all disabled. | 214 # dpkg --purge, so this is all disabled. |
208 # | 215 # |
209 #determine_rpm_package_manager | 216 #determine_rpm_package_manager |
210 # | 217 # |
211 #case $PACKAGEMANAGER in | 218 #case $PACKAGEMANAGER in |
212 #"yum") | 219 #"yum") |
213 # remove_yum | 220 # remove_yum |
214 # ;; | 221 # ;; |
215 #"urpmi") | 222 #"urpmi") |
216 # remove_urpmi | 223 # remove_urpmi |
217 # ;; | 224 # ;; |
218 #"yast") | 225 #"yast") |
219 # remove_yast | 226 # remove_yast |
220 # ;; | 227 # ;; |
221 #esac | 228 #esac |
222 | 229 |
223 exit 0 | 230 exit 0 |
224 | 231 |
225 #------------------------------------------------------------------------------ | 232 #------------------------------------------------------------------------------ |
226 # Post uninstallation script | 233 # Post uninstallation script |
227 #------------------------------------------------------------------------------ | 234 #------------------------------------------------------------------------------ |
228 %postun | 235 %postun |
229 | 236 |
230 exit 0 | 237 exit 0 |
OLD | NEW |