博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
rh401 - RPM编包示例 - 一份Makefile文件和与之对应hello.spec文件
阅读量:4176 次
发布时间:2019-05-26

本文共 2256 字,大约阅读时间需要 7 分钟。

Makefile:

## Makefile for the "hello" open source library and application#VERSION=1.0CC=gccCFLAGS=-O2.PHONY: libhello allall: hellohello: libhello.so.1 hello.o	$(CC) $(CFLAGS) hello.o -L. -lhello -o hellohello.o: libhello.hlibhello: libhello.so.1libhello.so.1: libhello.o	$(CC) -shared -Wl,-soname,libhello.so.1 libhello.o -lc -o libhello.so.1.0	ln -sf libhello.so.1.0 libhello.so.1	ln -sf libhello.so.1   libhello.solibhello.o: libhello.h	$(CC) $(CFLAGS) -fPIC -c libhello.cclean:	rm -f *.o *.so* hello hello*.tar.gztar: clean	cd ..; tar czvf hello-$(VERSION).tar.gz --exclude .svn hello-$(VERSION)install: all	install libhello.so.1.0	/usr/local/lib	ln -sf libhello.so.1.0	/usr/local/lib/libhello.so.1	ln -sf libhello.so.1	/usr/local/lib/libhello.so	install hello		/usr/local/bin	install hello.1		/usr/local/share/man/man1#	install hello.conf	/etc/ld.so.conf.d	/sbin/ldconfiguninstall:	rm -f /usr/local/lib/libhello.so*	rm -f /usr/local/bin/hello	rm -f /usr/local/share/man/man1/hello.1#	rm -f /etc/ld.so.conf.d/hello.conf	/sbin/ldconfig
hello.spec

Summary: Hello motivational softwareName: helloVersion: 1.0Release: 1License: Freely redistributable without restrictionGroup: Applications/ProductivitySource0: %{name}-%{version}.tar.gzBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%descriptionhello is a soft skills enhancement applicationused by well-managed organizations worldwide.%prep%setup -q%buildmake%installrm -rf $RPM_BUILD_ROOTmkdir -p $RPM_BUILD_ROOT/usr/local/{bin,lib,share/man/man1}mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.dinstall libhello.so.1.0 $RPM_BUILD_ROOT/usr/local/libinstall hello $RPM_BUILD_ROOT/usr/local/bingzip -9c hello.1 > hello.1.gzinstall hello.1.gz $RPM_BUILD_ROOT/usr/local/share/man/man1install hello.conf $RPM_BUILD_ROOT/etc/ld.so.conf.d%cleanmake cleanrm -rf $RPM_BUILD_ROOT%files%defattr(-,root,root,-)%config(noreplace) /etc/ld.so.conf.d/hello.conf/usr/local/bin/hello/usr/local/lib/libhello.so.1.0%doc /usr/local/share/man/man1/hello.1.gz%doc README%postln -sf libhello.so.1.0 /usr/local/lib/libhello.so.1ln -sf libhello.so.1 /usr/local/lib/libhello.so/sbin/ldconfig%changelog* Wed Jan 27 2010 Charles Channelman 
- 1.0-1- Initial build.

本文相关资源下载:

http://download.csdn.net/detail/t0nsha/4559332

转载地址:http://qjtai.baihongyu.com/

你可能感兴趣的文章
在C++中如何实现模板函数的外部调用
查看>>
HTML5学习之——HTML 5 拖放
查看>>
HTML5学习之——HTML 5 应用程序缓存
查看>>
HTML5学习之——HTML 5 Web Workers
查看>>
HTML5学习之——HTML 5 Canvas
查看>>
HTML5学习之——HTML5 内联 SVG
查看>>
HTML5学习之——HTML 5 服务器发送事件
查看>>
SVG学习之——HTML 页面中的 SVG
查看>>
SVG 形状学习之——SVG圆形
查看>>
SVG 滤镜学习之——SVG 滤镜
查看>>
mysql中用命令行复制表结构的方法
查看>>
hbase shell出现ERROR: org.apache.hadoop.hbase.ipc.ServerNotRunningYetException
查看>>
让代码变得更优雅-Lombok
查看>>
解决Rhythmbox乱码
查看>>
豆瓣爱问共享资料插件发布啦
查看>>
Ubuntu10.10 CAJView安装 读取nh\kdh\caj文件 成功
查看>>
kermit的安装和配置
查看>>
vim 配置
查看>>
openocd zylin
查看>>
进程创建时文件系统处理
查看>>