forked from dvorka/mindforger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding RPM conversion in Fedore for dvorka#378.
- Loading branch information
Showing
1 changed file
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,47 @@ | ||
#!/bin/bash | ||
# | ||
# MindForger knowledge management tool | ||
# | ||
# Copyright (C) 2016-2018 Martin Dvorak <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
... script to generate from alien and resolve filesystem conflicts... | ||
# Method: binary deb -alien-> -fixes-> rpm | ||
|
||
# This script is available from http://www.mindforger.com/fedora/fedora-rpm-from-deb.sh | ||
# to be easily available in VMs | ||
|
||
export PRJNAME="mindforger_0.7.1-1_amd64" | ||
|
||
# IMPORTANT: this script must be run as root | ||
|
||
# a) everything works just fine | ||
# alien -r mindforger_0.7.1-1_amd64.deb | ||
|
||
# b) alien generates RPM that conflicts w/ other RPMs | ||
# https://www.electricmonk.nl/log/2017/02/23/how-to-solve-rpms-created-by-alien-having-file-conflicts/ | ||
|
||
alien -r -g -v "${DEBNAME}.deb" | ||
|
||
# remove the following lines: | ||
#%dir "/" | ||
#%dir "/usr/bin/" | ||
sed -i 's#%dir "/"##' ${PRJNAME}/${PRJNAME}-1.spec | ||
sed -i 's#%dir "/usr/bin/"##' ${PRJNAME}/${PRJNAME}-1.spec | ||
|
||
# recreate RPM | ||
cd ${PRJNAME} | ||
rpmbuild --target=noarch --buildroot /full/path/to/${PRJNAME}/ -bb cfgtrack-$(REL_VERSION)-2.spec | ||
|
||
# end |